domingo, julho 18, 2010

Error installing ruby-debug

Last week I tried to install ruby-debug on my Ubuntu 9.10 and I got an error as you can see below:

andreyq@desenv-ubuntu-9:~$ sudo gem install ruby-debug
[sudo] password for andreyq:
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1

Gem files will remain installed in /var/lib/gems/1.8/gems/linecache-0.43 for inspection.
Results logged to /var/lib/gems/1.8/gems/linecache-0.43/ext/gem_make.out
andreyq@desenv-ubuntu-9:~$

After some research I discovered that I needed to have
ruby1.8-dev
package installed in order to satisfy some dependencies.

I did it
sudo apt-get install ruby1.8-dev
and then I tried again to install ruby-debug on my system:

andreyq@desenv-ubuntu-9:~$ sudo gem install ruby-debug
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Successfully installed linecache-0.43
Successfully installed ruby-debug-base-0.10.3
Successfully installed ruby-debug-0.10.3
3 gems installed
Installing ri documentation for linecache-0.43...
Installing ri documentation for ruby-debug-base-0.10.3...
Installing ri documentation for ruby-debug-0.10.3...
Installing RDoc documentation for linecache-0.43...
Installing RDoc documentation for ruby-debug-base-0.10.3...
Installing RDoc documentation for ruby-debug-0.10.3...
andreyq@desenv-ubuntu-9:~$

Great! It worked!

What is weird is that I thought that the
ruby1.8-dev
package would be required only for changes on ruby itself.

Nenhum comentário: