Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

json 1.8.2 gem giving me fatal error stdio.h

Trying to install

gem install json -v '1.8.2'

(..or bundle install with gem 'json', '1.8.2' in Gemfile)

...on Ubuntu 14.04 VM gives me:

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

    /home/deploy/.rbenv/versions/2.1.5/bin/ruby extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
In file included from /home/deploy/.rbenv/versions/2.1.5/include/ruby-2.1.0/ruby/ruby.h:29:0,
                 from /home/deploy/.rbenv/versions/2.1.5/include/ruby-2.1.0/ruby.h:33,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
/home/deploy/.rbenv/versions/2.1.5/include/ruby-2.1.0/ruby/defines.h:26:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
like image 680
equivalent8 Avatar asked Sep 28 '22 10:09

equivalent8


1 Answers

sudo apt-get install libc6-dev

fixed it

like image 143
equivalent8 Avatar answered Oct 03 '22 09:10

equivalent8