0

在这被标记为重复之前,我已经看到了这个问题,并尝试了那里建议的符号链接方法。那没起效。

我在运行 OS X 10.8.5、Xcode 5.0 和 GCC 4.8.1 的系统上,独立于命令行工具/开发工具安装。尝试安装cURL时,运行时出现此错误./configure

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/me/Downloads/curl-7.32.0':
configure: error: C compiler cannot create executables

检查后config.log,我发现了这个:

configure:4126: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.

还有这个:

configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "curl"
| #define PACKAGE_TARNAME "curl"
| #define PACKAGE_VERSION "-"
| #define PACKAGE_STRING "curl -"
| #define PACKAGE_BUGREPORT "a suitable curl mailing list: http://curl.haxx.se/mail/"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int main (void)
| {
| 
|  ;
|  return 0;
| }

我不确定第一部分是否在./configure失败中发挥了作用,我完全不确定如何处理后一部分。

如何解决这个问题?

4

1 回答 1

0

很可能configure无法找到您指定的 C 编译器。检查以下至少一项是否属实:

  1. 您的编译器位于$PATH环境变量的目录中。
  2. CC=调用的参数是configure编译器的有效路径。
于 2015-01-16T22:59:21.737 回答