2

I am trying to install the ruby gem pdfbeads via sudo gem install pdfbeads

All i get is an error message which looks cryptic to me an searching for it does not result in useful posts...

Building native extensions.  This could take a while...
ERROR:  Error installing pdfbeads:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:4:in `<main>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri 1.6.6.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out

I think it is something stupid but I can not solve the problem myself.

2 Answers 2

2

I recently installed pdfbeads on an Ubuntu 15.04 machine and struggled again with some error messages so just a quick update what is necessary for an installation from a fresh system. Some of those devices are not neccesarry maybe but at with this it should work:

$ sudo apt-get install python2.7 python2.7-dev python-virtualenv libusb-dev\
  libjpeg-dev libtiff-dev libqt4-core rubygems ruby-rmagick libmagickwand-dev\
  ruby-hpricot scantailor djvulibre-bin libffi-dev libjpeg8-dev
$ sudo apt-get install ruby-dev
$ sudo apt-get install imagemagick
$ sudo apt-get install graphicsmagick
$ sudo apt-get install libmagickcore-dev
$ sudo gem install rmagick
$ sudo gem install iconv
$ sudo gem install pdfbeads
0

Some googling seems to indicate that you are missing a package: ruby-dev.

To install it, just run the following:

sudo apt-get install ruby-dev

After that just try doing sudo gem install pdfbeads and it should work.

1
  • Thank you a lot - i spent my entire evening in trying and as always it was something stupid...
    – mhwh
    Aug 13, 2015 at 5:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .