Question

Trying to install Ruby 2.2.0-dev using ruby-build gives me an error about 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 seems to claim that autoconf 2.69 is available. Unless it's only using autoconf for itself, without allowing it to be used by others:

$ 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)

I don't think homebrew is using autoconf for itself (keg-only?), because doing brew upgrade autoconf gave me Error: autoconf-2.69 already installed.

However, when I run autoconf, it claims that it's only version 2.61:

$ autoconf --version
autoconf (GNU Autoconf) 2.61

My $PATH:

/Users/agrimm/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin

My uname:

$ 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

How do I fix the error in installing 2.2.0-dev?

Does ruby-build use its own autoconf, or does it only use whatever is available to the user? If so, what is the recommended way to make autoconf 2.67 or higher available to ruby-build?

Was it helpful?

Solution

brew link --overwrite autoconf will make rbenv use homebrew autoconf version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top