我正在尝试在我的 mac 上安装 lynx
/wget
。安装需要 gcc
编译。我的 /usr/local/bin
目录中有 gcc
。我看到它非常多。
spankincubus:Downloads spankincubus$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.0.0/4.6.1/lto- wrapper
Target: x86_64-apple-darwin11.0.0
Configured with: ../gcc-4.6.1/configure --enable-languages=fortran,c++
Thread model: posix
gcc version 4.6.1 (GCC)
但是当我为 wget 运行配置实用程序时,出现错误。任何想法??郑重声明,我不是 gcc
专家。
checking whether make sets $(MAKE)... no
checking build system type... i386-apple-darwin11.4.2
checking host system type... i386-apple-darwin11.4.2
checking for gcc... gcc
checking whether the C compiler works... no
**configure: error: in `/usr/local/bin/wget-1.14':
configure: error: C compiler cannot create executables
See `config.log' for more details**
这是我的 gcc 的样子
-rwxr-xr-x 1 root wheel 91368 Jul 23 2011 gcov
-rwxr-xr-x 1 root wheel 462124 Jul 23 2011 cpp
-rwxr-xr-x 1 root wheel 462060 Jul 23 2011 gcc
最佳答案
老实说,尽管 gcc 似乎存在;但它是否指向有效安装?听起来它仍然没有正确安装并且升级到 Mountain Lion,您所有的开源工具都已被清除并推送到 Xcode,并且必须在必要时手动安装。
关于c++ - MAC OSX 狮子 : gcc on mac not compiling wget,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18158861/