1

I am installing riemann monitoring tool on my PC. I run the following command from terminal:

Command:

sudo gem install riemann-tools

I get the following error:

ERROR:  Error installing riemann-tools:
        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:1:in `<main>'

A similar error comes when installing riemann-dash but riemann-client get installed successfully.

I am using Ububtu 12.10. I read online about such errors and it had something with ruby version, but I am not able to figure out the reason for this.

Any help is appreciated.

Siddharth Trikha
  • 2,648
  • 8
  • 57
  • 101
  • 1
    When you get the `Failed to build gem native extension` error, the fist thing to check is that you have the native development tools installed. The C compiler, etc. On Centos: `yum groupinstall 'Development Tools'`, on Ubuntu, try: `sudo apt-get install build-essential checkinstall` – Daiku Jun 23 '14 at 13:12
  • @Daiku: I did `sudo apt-get install build-essential checkinstall` but still I get the same error. – Siddharth Trikha Jun 24 '14 at 04:16
  • @Daiku: It's working now. I removed sudo from `sudo gem install riemann-tools`. Strange I guess. – Siddharth Trikha Jun 24 '14 at 09:04
  • That is odd. Glad it's working for you. CB. – Daiku Jun 24 '14 at 12:58

1 Answers1

3

this solved it for me:

For Debian/Ubuntu

apt-get install ruby-dev zlib1g-dev 

For RedHat/CentOS/Fedora:

yum install ruby-devel zlib-devel
abualy
  • 131
  • 1
  • 3