Fpm: Error installing fpm: Failed to build gem native extension.

Created on 29 Jan 2015  路  3Comments  路  Source: jordansissel/fpm

vadi@gooseberry:~$ sudo gem install fpm
[sudo] password for vadi: 
Fetching: json-1.8.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing fpm:
    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>'


Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
vadi@gooseberry:~$ gem -v
1.8.23
vadi@gooseberry:~$ lsb_release -d
Description:    Ubuntu 14.04.1 LTS
vadi@gooseberry:~$ 

Most helpful comment

This is a bug in debian/ubuntu that leaves you with a half-installed ruby.

The solution is to apt-get install ruby-dev gcc - See https://github.com/jordansissel/fpm#system-packages for other platforms.

All 3 comments

This is a bug in debian/ubuntu that leaves you with a half-installed ruby.

The solution is to apt-get install ruby-dev gcc - See https://github.com/jordansissel/fpm#system-packages for other platforms.

My fault. Thanks.

Are there any known problems running this on a debian docker container?

I have a container with the following steps now producing this error, when as recently as two weeks ago I had no problems. I only got the error when I selected the --no-cache option for docker build, now I can't build at all.

Dockerfile:

FROM ubuntu

RUN apt-get update
RUN apt-get -y install curl ruby-dev ruby1.9.1-dev gcc make \
    libc6-dev \
    python-dev \
    libcurl4-gnutls-dev \
    librtmp-dev \
    rsync

RUN gem install fpm
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rdegges picture rdegges  路  4Comments

hellosputnik picture hellosputnik  路  7Comments

dogonthehorizon picture dogonthehorizon  路  3Comments

neomatrix369 picture neomatrix369  路  4Comments

hellosputnik picture hellosputnik  路  4Comments