ruby on rails - rmagick installation issue on ubuntu 16.04 -
i'm trying install rmagick 2.13.1
legacy rails application on ubuntu 16.04. following error when bundle install
:
gem::installer::extensionbuilderror: error: failed build gem native extension. /home/uping/.rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking ruby version >= 1.8.5... yes extconf.rb:128: use rbconfig instead of obsolete , deprecated config. checking gcc... yes checking magick-config... yes checking imagemagick version >= 6.4.9... yes checking hdri disabled version of imagemagick... yes checking stdint.h... *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options. provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/uping/.rubies/ruby-1.9.3-p194/bin/ruby /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': compiler failed generate executable file. (runtimeerror) have install development tools first. /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' /home/uping/.rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' extconf.rb:193:in `<main>'
following content of mkmf.log
checking ruby version >= 1.8.5... -------------------- yes -------------------- find_executable: checking gcc... -------------------- yes -------------------- find_executable: checking magick-config... -------------------- yes -------------------- checking imagemagick version >= 6.4.9... -------------------- yes -------------------- checking hdri disabled version of imagemagick... -------------------- yes -------------------- "gcc -o conftest -i/home/uping/.rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-linux -i/home/uping/.rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/backward -i/home/uping/.rubies/ruby-1.9.3-p194/include/ruby-1.9.1 -i. -i/usr/include/graphicsmagick -fopenmp -wall -g -fno-strict-aliasing -o2 -wall -pthread conftest.c -l. -l/home/uping/.rubies/ruby-1.9.3-p194/lib -wl,-r/home/uping/.rubies/ruby-1.9.3-p194/lib -l/usr/lib -l/usr/lib/x11 -lgraphicsmagick -ljbig -lwebp -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -lwmflite -lxext -lsm -lice -lx11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread -wl,-r -wl,/home/uping/.rubies/ruby-1.9.3-p194/lib -l/home/uping/.rubies/ruby-1.9.3-p194/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc" /usr/bin/ld: cannot find -lwebp collect2: error: ld returned 1 exit status checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main() {return 0;} /* end */
what causing issue?
the linker complaining don't have libwebp. don't have ubuntu looks can install using
sudo apt-get install webp
and rebuild imagemagick.
Comments
Post a Comment