kenshinji
kenshinji

Reputation: 2081

can't install mechanize on my VPS by gem install command

I tried to install mechanize gem on my Ubuntu 14.04.1 VPS.

After running gem install mechanize I got:

enter image description here

Upvotes: 0

Views: 123

Answers (1)

kenshinji
kenshinji

Reputation: 2081

As it prompt me to check mkmf.log for more details, so I tried find ~/.rvm -name mkmf.log, and found the mkmf.log file is located under the directory /home/kenshinji/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/unf_ext-0.0.7.1/mkmf.log. then I tried cat /home/kenshinji/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/unf_ext-0.0.7.1/mkmf.log, it showed the following message: enter image description here

it indicates that can't find lgmp, so I issued the command sudo apt-get install libgmp-dev, after libgmp-dev has being installed, then I re-try gem install mechanize, done! It works!

Upvotes: 1

Related Questions