20

Guys I'm about to kill myself with this one!

I had some problems with RVM installing multiple versions of Ruby, and following a thread on Stackoverflow I decided to remove it completely. After reinstalling RVM, I am unable to install any Ruby version at all.

  • Mac OS X
  • RVM 1.20.10 stable
  • Homebrew 0.9.4

Here are some logs:

rvm install 2.0.0-p0

or:

rvm install 2.0.0-p195 --autolibs=enabled

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxml2, libxslt, libksba, openssl…
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config libyaml readline libxml2 libxslt libksba openssl',
please read /Users/admin/.rvm/log/ruby-2.0.0-p0/1368903329_package_install_autoconf_automake_libtool_pkg-config_libyaml_readline_libxml2_libxslt_libksba_openssl.log

Logfile reads:

[2013-05-18 22:55:29] requirements_osx_brew_libs_install
Error: No such keg: /usr/local/Cellar/autoconf
There were package installation errors, make sure to read the log.
Check Homebrew requirements github.com/mxcl/homebrew/wiki/Installation

brew doctor

Your system is ready to brew.

brew cleanup

Removing: /Library/Caches/Homebrew/automake-1.13.1.tar.gz…
Error: Permission denied — /Library/Caches/Homebrew/automake-1.13.1.tar.gz

brew reinstall autoconf

Error: No such keg: /usr/local/Cellar/autoconf

Help!

5
  • maybe you can cleanup as root with sudo brew cleanup and then try brew install autoconf ?
    – lis2
    Commented May 19, 2013 at 8:38
  • tried that. Brew cleanup went through, but install autoconf gets me to Error: No such keg: /usr/local/Cellar/autoconf Commented May 19, 2013 at 9:15
  • did you run install instead of reinstall ?
    – lis2
    Commented May 19, 2013 at 9:49
  • Grammakovs-MacBook-Air:Cellar grammakov$ brew install autoconf Error: Permission denied - /Library/Caches/Homebrew/Formula/autoconf.brewing Grammakovs-MacBook-Air:Cellar grammakov$ sudo brew install autoconf Password: Error: Cowardly refusing to `sudo brew install' You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk. Commented May 19, 2013 at 10:23
  • Ok, after hours I managed to install autoconf, extending write permissions of the Library folder. Now however I am stuck again, as rvm install command keeps returning errors Commented May 19, 2013 at 16:30

9 Answers 9

65

I ran into the same issue, you need to manually install all the required packages using Brew. For me I had to run the following installs:

brew install autoconf
brew install automake
brew install libtool
brew install apple-gcc42
brew install libyaml
brew install libxslt
brew install libksba
brew install openssl

You just need to keep running "rvm requirements" and reading the log and installing the packages needed until there are no more errors.

7
  • Had problem with this method, brew unable to create symlink and when I run it with sudo it refuses to run
    – gerrytan
    Commented Jul 15, 2013 at 13:39
  • @gerrytan I had that issue. I needed to run sudo brew link autoconf after I ran brew install autoconf. I had to do that for all these packages. I suspect there is something fishy with my permissions, since the linking always fails but brew doesn't want you to install using sudo.
    – wuliwong
    Commented Jul 29, 2013 at 14:46
  • Strange, you shouldn't need to do sudo to run brew, since it installs everything in /usr/local. Check out this other post to fix your premissions: stackoverflow.com/questions/9800527/…
    – rlorenzo
    Commented Jul 29, 2013 at 18:04
  • 2
    yup, installing missing packages one by one, does the trick :)
    – Xander
    Commented Aug 28, 2013 at 16:30
  • Also worked for me but have to unlink then install pkg-config
    – rup3rt
    Commented Nov 2, 2013 at 21:04
8

After installing RVM, You'll want to run

rvm requirements

to see if anything else is required to install ruby and rails first.

here is the similar question asked rvm install ruby

4

This solved problem for me

sudo chown -R `whoami` /Library/Caches/Homebrew/
0

I had the same problem

brew install pkg-config

worked for me

0

I aswell ran into the permission problem. My /usr/local/opt where the packages are linked had permissions root:wheel. I changed permissions by doing

sudo chown -R <localuser>:staff /usr/local/opt

where of course "localuser" is your local user you used to install brew.

Then aswell I had to run

brew reinstall autoconf

and so on instead of just "install", since brew always kept on saying the lib already was installed (yet not linked). "reinstall" simply forces a new install of the package. that did the trick for me.

Hope this helps someone with similar problems.

0

User which is running brew should have write access to This entire directory path

/Library/Caches/Homebrew/Formula

No need to change ownership just write permission. then running rvm works

0

I was encountering similar issues, particular around the install of openssl098. I came across this Homebrew issue, tried rvm get head as suggested, and now rvm works perfectly.

0

I'd try to install Xcode Command Line Tools before.

0

Try

rvm reinstall ruby-2.3.1 --with-openssl-dir=`brew --prefix openssl`

rvm openssl on Mojave

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.