配置:错误:无法运行C编译程序。安装libtools-2.4.2时

时间:2019-01-10 16:00:19

标签: macos compilation homebrew configure automake

一直在努力建立自己的环境来运行生物信息学工具。该问题始于多个应用程序在autoreconf -fi: command not found中出现一致的 autogen.sh 错误。重新安装了autoconf,automake,libtools。

当前, libtools 安装在./configure上失败,但是autoconf automake 安装成功。 这是错误:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... libltdl/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-apple-darwin18.0.0
checking host system type... x86_64-apple-darwin18.0.0
configure: autobuild project... GNU Libtool
configure: autobuild revision... 2.4.2 ()
configure: autobuild hostname... MACUSR
configure: autobuild mode... default
configure: autobuild timestamp... 2019011
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/usr/local/libtool-2.4.2':
configure: error: cannot run C compiled programs.

尝试了Homebrew,它将所有我的工具安装在usr / local / Cellar中,但没有任何运行,我已经将工具位置添加到PATH变量中,但是没有运气。跟踪到jamf问题的问题: https://www.jamf.com/jamf-nation/discussions/28764/jamf-quickadd-symlinks-usr-local-bin-causing-install-problems-for-other-apps

卡住了,很高兴在这里提供建议。

1 个答案:

答案 0 :(得分:0)

长话短说,这是一个古老的gcc问题。我的PATH首先引用anaconda3 / bin,在那里它触发了在那里找到的gcc。将$ PATH更改为指向anaconda3之前的其他容器后,所有内容编译都没有问题。

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin