I've been looking around on other rmagick threads for a good solution. Nothing has worked so far.
I'm working on a rails project on c9 IDE. I managed to successfully install imagemagick via the 'sudo apt get install imagemagick' command.
However when I try to run 'gem install rmagick' I get the following error
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/rmagick-2.15.4/ext/RMagick
/usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160608-3911-1hut05d.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You 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=/usr/local/rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/mkmf.log extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby 2.3.0/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/gem_make.out
Try this (working for rmagick 3.0.0):
brew install imagemagick#6
brew link --force imagemagick#6
gem install rmagick
Related
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /home/ec2-user/.rvm/gems/ruby-2.6.5/gems/rmagick-4.2.2/ext/RMagick
/home/ec2-user/.rvm/rubies/ruby-2.6.5/bin/ruby -I /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0 -r ./siteconf20210806-10706-10mubyf.rb extconf.rb
checking for brew... no
checking for pacman... no
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.7.7)... no
checking for gcc... yes
checking for GNUC... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You 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/ec2-user/.rvm/rubies/ruby-2.6.5/bin/$(RUBY_BASE_NAME)
/home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:585:in block in try_compile'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:534:in with_werror' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:585:in try_compile'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:852:in macro_defined?' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:994:in block in have_macro'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:959:in block in checking_for' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:331:in open' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:331:in open' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:357:in postpone'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:958:in checking_for' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:993:in have_macro'
from extconf.rb:99:in configure_compile_options' from extconf.rb:19:in initialize'
from extconf.rb:398:in new' from extconf.rb:398:in '
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ec2-user/.rvm/gems/ruby-2.6.5/extensions/x86_64-linux/2.6.0/rmagick-4.2.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/ec2-user/.rvm/gems/ruby-2.6.5/gems/rmagick-4.2.2 for inspection.
Results logged to /home/ec2-user/.rvm/gems/ruby-2.6.5/extensions/x86_64-linux/2.6.0/rmagick-4.2.2/gem_make.out
sudo yum -y install ImageMagick ImageMagick-devel
convert -version
Output:
Version: ImageMagick 6.9.10-68 Q16 x86_64 2021-02-03 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(3.1)
Delegates (built-in): bzlib fontconfig freetype gslib jng jpeg lcms ltdl lzma png ps tiff wmf x xml zlib
3. gem install rmagick
if you still get the error follow below commands
sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.spec /usr/lib64/libgomp.spec
sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.a /usr/lib64/libgomp.a
sudo ln -s /usr/lib64/libgomp.so.1.0.0 /usr/lib64/libgomp.so
And run again gem install rmagick and its all done.
You can find the link below
https://senrenseyo.com/20210811/rails6_rmagick/
I'm new to native client. I'm trying to follow the official tutorial on my newly installed ubuntu 14.
I'm getting the following when running "make serve" under the getting_started folder. I googled, it seems to be related to 32/64 bit. my system is 64bit, but pnacl seems to think it is 32.
Anyway I couldn't find a solution. do you know how?
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/bin/pnacl-clang++ -o hello_tutorial.bc hello_tutorial.cc -O2 -I/media/shi/work/nacl_sdk/pepper_34/include -L/media/shi/work/nacl_sdk/pepper_34/lib/pnacl/Release -lppapi_cpp -lppapi
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/host_x86_32/bin/clang: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
make[1]: * [hello_tutorial.bc] Error 127
make[1]: Leaving directory `/media/shi/work/nacl_sdk/pepper_34/getting_started/part1'
make: * [part1_ALL_TARGET] Error 2
It's probably easiest to install the i386 C/C++ libraries:
sudo apt-get install libc6:i386 libstdc++6:i386
There are 64-bit binaries included in the SDK as well (in toolchain/linux_pnacl/bin64/), but they are not run by default (and I'm not certain of an easy way to make the SDK use them).
I should probably start by saying that I am new to rails. This specific error message came up as i was trying to run bundle install. Error pops up once installation gets to json.
=============================================================================
Installing json (1.8.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory -- extconf.rb (Loa
dError)
Gem files will remain installed in D:/Dev/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gem
s/json-1.8.0 for inspection.
Results logged to D:/Dev/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/
json/ext/generator/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that gem install json -v '1.8.0' succeeds before bundling.
===============================================================================
gem_make.out log file is showing
===============================================================================
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)
===============================================================================
I already tried running gem install json and essentially got the same error message. DevKit is already installed. Reinstalling it made no difference.
Ruby version is 1.9.3p392
Rails version is 3.2.13
OS is Windows7 64bit
installation was completed using rubyinstaller.
Any help will be greatly appreciated.
I got the same error when trying to install Cucumber using the Gemfile provided in The Cucumber Book (p. 299) and also with gem install json.
When trying gem install cucumber it worked:
Fetching: multi_json-1.8.0.gem (100%)
Successfully installed multi_json-1.8.0
...
hth
Frank
Trying to install libxslt-1.1.24 but getting an error during ./configure that says:
checking for libxml libraries >= 2.6.27... configure: error: Version 2.6.16 found. You need at least libxml2 2.6.27 for this version of libxslt
but libxml2-2.7.3 was JUST installed and can be seen in /usr/local/include/libxml2
How do I get libxslt to link to new libxml2 when ./configure?
The various --with-libxml-* arguments will allow you to point it to your alternate install of libxml2. See ./configure --help for more details.
Unsure if your ld cache would have been rebuilt by the libxslt install, but if not, try refreshing it by running:
ldconfig
(make sure /usr/local/lib is already in /etc/ld.so/conf).
Again, you may be linking static, or the cache may already be up-to-date, so this may not matter... but worth a shot I suppose.
It always says:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
similar things happen if it is sqlite3:
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Update: at least sqlite3 is building now... that is after I rvm remove 1.9.2-p180 and removing all the 1.9.2, and reinstall by rvm install 1.9.2 and now sqlite3 can be bundle installed, but mysql2 still has problem.
I installed the 64 bit version of MySQL server and it will bundle install, and then this question helped with the
Library not loaded: libmysqlclient.18.dylib (LoadError)
solution: Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem