Install Hpricot on Ubuntu

| Posted: - Last updated:
| Tagged general
| ~100wrds (~1min)

It’s quite easy. Make sure you have RubyGems and Ruby installed first, of course.

The problem:

$ sudo gem install hpricot
Building native extensions.  This could take a while...
ERROR:  Error installing hpricot:
	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

The solution:

sudo apt-get install ruby1.8-dev build-essential
sudo gem install hpricot

My site is free of ads and trackers. I record privacy-respecting usage statistics with Fathom.

Was this post helpful to you? Why not ☕ Buy me a coffee or use Brave Browser to send a tip.