[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

hpricot won't install on Ubuntu and complains because mkmf.rb is missing

Xeno Campanoli

7/6/2007 7:21:00 PM

I have mechanize installed on Feisty, which has Ruby 1.8.5, but when I
just tried to install it on Gutsy, which has 1.8.6, I got the following:

root@joehill:~# gem install mechanize
Install required dependency hpricot? [Yn]
Select which gem to install for your platform (i486-linux)
1. hpricot 0.6 (mswin32)
2. hpricot 0.6 (jruby)
3. hpricot 0.6 (ruby)
4. hpricot 0.5 (ruby)
5. hpricot 0.5 (mswin32)
6. Skip this gem
7. Cancel installation
> 3
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mechanize
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1


Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/hpricot-0.6 for inspection.
Results logged to
/usr/lib/ruby/gems/1.8/gems/hpricot-0.6/ext/hpricot_scan/gem_make.out
root@joehill:~#
---snip---
If this is a problem with the Ruby install on Gutsy/Ubuntu, please
explain that so I can bug it on Launchpad. Thanks.

xc
--
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.

3 Answers

Xeno Campanoli

7/6/2007 7:49:00 PM

0

Jason Roelofs wrote:
> You need the ruby development package (ruby1.8-dev).

Thank you. That fixed it.

>
> Jason
>
> On 7/6/07, Xeno Campanoli <xcampanoli@gmail.com> wrote:
>>
>> I have mechanize installed on Feisty, which has Ruby 1.8.5, but when I
>> just tried to install it on Gutsy, which has 1.8.6, I got the following:
>>
>> root@joehill:~# gem install mechanize
>> Install required dependency hpricot? [Yn]
>> Select which gem to install for your platform (i486-linux)
>> 1. hpricot 0.6 (mswin32)
>> 2. hpricot 0.6 (jruby)
>> 3. hpricot 0.6 (ruby)
>> 4. hpricot 0.5 (ruby)
>> 5. hpricot 0.5 (mswin32)
>> 6. Skip this gem
>> 7. Cancel installation
>> > 3
>> Building native extensions. This could take a while...
>> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
>> ERROR: Failed to build gem native extension.
>>
>> ruby extconf.rb install mechanize
>> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
>> from extconf.rb:1
>>
>>
>> Gem files will remain installed in
>> /usr/lib/ruby/gems/1.8/gems/hpricot-0.6 for inspection.
>> Results logged to
>> /usr/lib/ruby/gems/1.8/gems/hpricot-0.6/ext/hpricot_scan/gem_make.out
>> root@joehill:~#
>> ---snip---
>> If this is a problem with the Ruby install on Gutsy/Ubuntu, please
>> explain that so I can bug it on Launchpad. Thanks.
>>
>> xc
>> --
>> The only sustainable organizing methods focus not on scale,
>> but on good design of the functional unit,
>> not on winning battles, but on preservation.
>>
>>
>


--
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.

snowy

7/18/2007 8:21:00 PM

0

On 6 Jul., 21:20, Xeno Campanoli <xcampan...@gmail.com> wrote:
> ...
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
> ERROR: Failed to build gem native extension.
>
> ruby extconf.rb install mechanize
> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
> from extconf.rb:1

I got a similar error when I tried to install mongreal with

# gem install mongrel

In another tutorial I found the advice to download the ruby sources

# apt-get install ruby1.8-dev build-essential

After I did that I had no problems to install mongreal.
Maybe you have the same problem?

Martin

Xeno Campanoli

7/18/2007 10:33:00 PM

0

snowy@schneeweis.at wrote:
> On 6 Jul., 21:20, Xeno Campanoli <xcampan...@gmail.com> wrote:

I think the resolution was installing ruby1.8-dev:

> xeno@radioflyer:~$ apt-cache policy ruby1.8-dev
> ruby1.8-dev:
> Installed: 1.8.5-4ubuntu2
> Candidate: 1.8.5-4ubuntu2
> Version table:
> *** 1.8.5-4ubuntu2 0
> 500 http://archive.... feisty/main Packages
> 100 /var/lib/dpkg/status
xc

>> ...
>> Building native extensions. This could take a while...
>> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
>> ERROR: Failed to build gem native extension.
>>
>> ruby extconf.rb install mechanize
>> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
>> from extconf.rb:1
>
> I got a similar error when I tried to install mongreal with
>
> # gem install mongrel
>
> In another tutorial I found the advice to download the ruby sources
>
> # apt-get install ruby1.8-dev build-essential
>
> After I did that I had no problems to install mongreal.
> Maybe you have the same problem?
>
> Martin
>
>
>


--
The only sustainable organizing methods focus not on scale,
but on good design of the functional unit,
not on winning battles, but on preservation.