Akira  Noguchi
Akira Noguchi

Reputation: 901

install gmp failed when installing ruby

I have some problems installing ruby.

$ rvm install 1.8.7

install log is below.

current path: /Users/myaccount
command(6): requirements_osx_brew_libs_install gcc46 libyaml readline libksba openssl098
Error: No such keg: /usr/local/Cellar/gcc46
==> Installing dependencies for gcc46: gmp4, mpfr2, libmpc08, ppl011, cloog-ppl015
==> Installing gcc46 dependency: gmp4
==> Downloading ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
Error: Download failed: ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2
There were package installation errors, make sure to read the log.

Downloading gmp is failed.

I tried some commands to fix this.

$ rvm install head

$ rvm install latest

But, same problem occur.

How to fix ??

Upvotes: 1

Views: 627

Answers (1)

Matt Ball
Matt Ball

Reputation: 21

FTP port might be blocked on your network. Try changing the url for the gmp4 formula. Should be in /usr/local/Library/Formula/gmp4.rb.

On line 5 change

url 'ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2'

to

url 'http://gnu.mirrorcatalogs.com/gmp/gmp-4.3.2.tar.bz2'

The nice thing about brew is being able to change stuff like this. Unfortunately if you do this you might need to change the url for many more dependencies. Might be better to install this from a different location where you can hit ftp.

Upvotes: 2

Related Questions