Ruby-build需要Autoconf版本2.67或更高版本

时间:2014-01-07 01:22:57

标签: ruby homebrew autoconf rbenv

尝试使用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)

我认为自制软件本身并不使用autoconf(仅限keg?),因为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或更高版本的推荐方法是什么?

1 个答案:

答案 0 :(得分:1)

brew link --overwrite autoconf将使rbenv使用自制的autoconf版本。