Tuesday, April 09, 2013

Error running 'requirements_brew_libs_install libksba' or libgpg-error Ruby 2.0.0 on MAC, brew and RVM


Problem: 
If you have problem installing ruby 2.0.0 on your mac using rvm and brew. And the problem could be timeout error .

rvm install ruby-2.0.0-p0

Installing requirements for osx, might require sudo password.
Already up-to-date.
Installing required packages: libksba....
^CError running 'requirements_brew_libs_install libksba',
please read /Users/XXX/.rvm/log/ruby-2.0.0-p0/package_install_libksba.log

log file :

(curl: (56) Recv failure: Operation timed out)


Solution: 

vi  /usr/local/Library/Formula/libgpg-error.rb
Replace: url 'ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.9.tar.gz'
with  url 'http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.11.tar.gz'

same case with libksba

This should works if it complain sha1 stuff replace expected one on ruby code.