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!

The Whiz of Oz
  • 6,763
  • 9
  • 48
  • 85
  • maybe you can cleanup as root with sudo brew cleanup and then try brew install autoconf ? – lis2 May 19 '13 at 08:38
  • tried that. Brew cleanup went through, but install autoconf gets me to Error: No such keg: /usr/local/Cellar/autoconf – The Whiz of Oz May 19 '13 at 09:15
  • did you run install instead of reinstall ? – lis2 May 19 '13 at 09: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. – The Whiz of Oz May 19 '13 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 – The Whiz of Oz May 19 '13 at 16:30

9 Answers9

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.

rlorenzo
  • 1,358
  • 1
  • 13
  • 16
  • Had problem with this method, brew unable to create symlink and when I run it with sudo it refuses to run – gerrytan Jul 15 '13 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 Jul 29 '13 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: http://stackoverflow.com/questions/9800527/homebrew-install-permissions-issue – rlorenzo Jul 29 '13 at 18:04
  • 2
    yup, installing missing packages one by one, does the trick :) – Xander Aug 28 '13 at 16:30
  • Also worked for me but have to unlink then install pkg-config – rup3rt Nov 02 '13 at 21:04
  • This saved me a bunch of time and fixed all my issues, thank you! – RustyCollins Apr 08 '14 at 21:24
  • Thanks! Mine wanted gcc42 instead of apple-gcc42 and I wasn't sure if I could install apple-gcc42 instead. I installed gcc42. It took about 25 minutes and my fan would go full speed occasionally, but eventually it did install. – Gavin Apr 19 '14 at 12:23
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

Community
  • 1
  • 1
fengd
  • 7,551
  • 3
  • 41
  • 44
4

This solved problem for me

sudo chown -R `whoami` /Library/Caches/Homebrew/
Tejasvi Manmatha
  • 564
  • 7
  • 12
0

I had the same problem

brew install pkg-config

worked for me

Matt Frear
  • 52,283
  • 12
  • 78
  • 86
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.

luba
  • 104
  • 4
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

Jishnu
  • 1
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.

Philip O'Brien
  • 4,146
  • 10
  • 46
  • 96
0

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

Artem Kirillov
  • 1,132
  • 10
  • 25
0

Try

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

rvm openssl on Mojave

Scorpiuszjj
  • 91
  • 1
  • 5