【发布时间】:2014-01-07 01:22:56
【问题描述】:
尝试使用 ruby-build 安装 Ruby 2.2.0-dev 时出现关于 Autoconf 的错误:
$ rbenv install 2.2.0-dev
Cloning https://github.com/ruby/ruby.git...
Installing ruby-2.2.0-dev...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294
Results logged to /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294.log
Last 10 log lines:
/var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294 ~/bogus/path
Cloning into 'ruby-2.2.0-dev'...
/var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294/ruby-2.2.0-dev /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20140107115843.2294 ~/bogus/path
configure.in:6: error: Autoconf version 2.67 or higher is required
configure.in:6: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
Homebrew 似乎声称 autoconf 2.69 可用。除非它只为自己使用autoconf,不允许其他人使用:
$ brew list autoconf
/usr/local/Cellar/autoconf/2.69/bin/ifnames
/usr/local/Cellar/autoconf/2.69/bin/autoupdate
/usr/local/Cellar/autoconf/2.69/bin/autoscan
/usr/local/Cellar/autoconf/2.69/bin/autoreconf
/usr/local/Cellar/autoconf/2.69/bin/autom4te
/usr/local/Cellar/autoconf/2.69/bin/autoheader
/usr/local/Cellar/autoconf/2.69/bin/autoconf
/usr/local/Cellar/autoconf/2.69/share/autoconf/ (42 files)
/usr/local/Cellar/autoconf/2.69/share/emacs/ (4 files)
/usr/local/Cellar/autoconf/2.69/share/man/ (9 files)
我不认为 homebrew 自己使用 autoconf(仅限桶?),因为做 brew upgrade autoconf 给了我 Error: autoconf-2.69 already installed。
但是,当我运行 autoconf 时,它声称它只有 2.61 版:
$ autoconf --version
autoconf (GNU Autoconf) 2.61
我的$PATH:
/Users/agrimm/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin
我的名字:
$ uname -a
Darwin [redacted] 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
如何解决安装 2.2.0-dev 的错误?
ruby-build 是使用它自己的 autoconf,还是只使用用户可用的任何东西?如果是这样,让 ruby-build 可以使用 autoconf 2.67 或更高版本的推荐方法是什么?
【问题讨论】:
-
brew link --overwrite autoconf有帮助吗? -
@mechanicalfish 如果我做了
brew link --overwrite --force autoconf,那行得通。把它变成一个答案!
标签: ruby homebrew autoconf rbenv