all! I have a problem when installing rmagick gem on CentOS 5.5 server. When I issued command:
gem install rmagick
I got:
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/bin:/bin
*** 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.
I have installed imagemagick with correct version, and I find Magick-config in /usr/local/bin and my PATH includes that dir. However, the rmagick gem installer just does not search that dir for Magick-config. What should I do?
By the way, I have another CentOS 5 machine installing ruby and rmagick successfully, and the latter has the Magick-config file in /usr/local/bin, too.
did you installed Imagemagick? eg:
yum install gcc gcc-c++ ImageMagick-devel ghostscript freetype-devel \
libjpeg-devel libpng-devel libpng10-devel libwmf-devel libexif-devel \
libtiff-devel
See this brilliant post on how to fix it. Just skip the last 3 lines as they are PHP related.
http://codercake.com/installing-imagemagick-6-6-9-7-and-imagick-for-php-on-centos-5-5-64-bit/#comment-39
here the commend which I was used in my command prompt. Please check the version
gem install rmagick -v '2.13.1' --platform=ruby -- --with-opt-lib=C:/ImageMagick-6.8.7-Q8/lib --with-opt-include=C:/ImageMagick-6.8.7-Q8/include
On Mac High Sierra - 10.13.4 - https://www.imagemagick.org/script/download.php
sudo port install ImageMagick
sudo gem install rmagick
Related
I am using cloud9.
I want to use gem 'rmagick', but using bundle, following error message occurs...
please help...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/rvm/gems/ruby-2.4.0/gems/rmagick-2.16.0/ext/RMagick
/usr/local/rvm/rubies/ruby-2.4.0/bin/ruby -r
./siteconf20180204-XXXXXX-oyXXpq.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.
I just spun up a Cloud9 VM and tried it.
My Cloud9 VM I tried used yum as a package manager. Meaning I installed ImageMagick via sudo yum install ImageMagick-devel... when I did that my gem install rmagick worked.
Didn't try it with Bundler, but if gem install works then it should work in Bundler also.
Using the command prompt install/update imagemagick via
sudo apt-get update
Then
sudo apt-get install imagemagick
See more
Hope it helps
I'm trying to install rmagick on Mountain Lion.
I've installed ImageMagick successfully by Homebrew, but I can't install rmagick gem.
My ruby environment is managed by rvm and installed ruby 1.8.6.
I've got an error below when tried to install rmagick.
gem install rmagick -v 2.7.2
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/Macmini/.rvm/rubies/ruby-1.8.6-p420/bin/ruby extconf.rb
checking for Ruby version >= 1.8.2... yes
checking for /usr/bin/gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.0... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... no
checking for sys/types.h... no
checking for magick/MagickCore.h... no
Can't install RMagick 2.7.2. Can't find MagickCore.h.
The erros shows that counldn't find MagickCore.h, but I found in /usr/local/Cellar/imagemagick/6.8.6-3/include/ImageMagick-6/magick/MagickCore.h
I guess if I can manage to tell installer this path, it will go well but I've no idea to do it.
I've googled and found similar questions below.
Can't install rmagick in Mountain Lion
"rmagick" gem installation issue
And tried to pass PKG_CONFIG_PATH and C_INCLUDE_PATH before 'gem install' command, and wrote them to ~/.bash_profie, and build ImageMagick from source, but nothing changed.
Does anyone know how to fix it?
Here you'll find the answer. I had the same issue and this solved perfectly!
Rails and OS X: How to install rmagick?
rmagick has a problem working with imagemagick (>= 6.8.0-10) from homebrew.
You can either
update rmagick gem by
bundle update rmagick
or manually symbol link some dylib to make it work:
$ cd "`Magick-config --prefix`lib"
$ ln -s libMagick++-Q16.7.dylib libMagick++.dylib
$ ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
$ ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib
After that gem install rmagick should work.
I have been trying to install the TinyTDS gem on a Macbook with OSX 10.6. I was successful in installing Free TDS -- confirmed that it works via:
tsql -H SERVER -p 1433 -U username.
The error I'm getting from gem install tiny_tds is:
Building native extensions. This could take a while...
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
/Users/jason/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
-----
freetds is missing.
-----
*** 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.
I've tried specifying the TDS lib and include dirs (/usr/local/lib and /usr/local/include) without luck. I've tried reinstalling FreeTDS from source manually as well as via homebrew, but that made no difference.
I've seen a few similar issues posted, but they seem to reference an issue with locating iconv libraries which I appear to be moving beyond.
Any suggestions or references I may have overlooked? Thanks in advance.
Same problem on Ubuntu 14.04 resolved with:
sudo apt-get install freetds-dev
gem install tiny_tds
Log output:
Building native extensions. This could take a while...
/home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /mnt/datapart/david in PATH, mode 040777
Successfully installed tiny_tds-0.6.1
Parsing documentation for tiny_tds-0.6.1
Installing ri documentation for tiny_tds-0.6.1
Done installing documentation for tiny_tds after 0 seconds
1 gem installed
You need to install freetds with homebrew
brew update # always a good idea to update homebrew before installing anything!
brew install freetds
In my case, it seems the symlinks were not configured correctly, and using "brew link freetds" threw errors which required opening up some permissions. I tried just about everything else, and this is finally what worked:
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/doc/freetds/images
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/doc/freetds/reference
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/doc/freetds/userguide
devMac:0.95.18 Me$ sudo chown -R $USER /usr/local/share/man/man5
devMac:0.95.18 Me$ brew link --overwrite freetds
Linking /usr/local/Cellar/freetds/0.95.18... 2812 symlinks created
devMac:0.95.18 Me$ sudo gem install tiny_tds
Building native extensions. This could take a while...
Successfully installed tiny_tds-0.6.2
Parsing documentation for tiny_tds-0.6.2
Installing ri documentation for tiny_tds-0.6.2
Done installing documentation for tiny_tds after 0 seconds
1 gem installed
Disclaimer: I am in the early stages of learning this framework and do not have an understanding of the repercussions of using overwrite or changing these permissions.
In my case, installing Ruby 2.3.0 using brew install ruby worked. I got the idea from this question Cannot install tiny_tds on os.x 10.9.4.
I know this has been asked several times, but the problem is they bring in new versions of rmagick and the older methods are not applicable now.
Server - CentOS release 5.6 (Final)
Ruby - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-linux]
Rails - 2.3.5
I tried to install rmagick gem through these steps. I was root user when I executed these queries:
yum install ImageMagick.i386
yum install ImageMagick-c++-devel.i386
gem install rmagick
The first 2 commands executed smoothly without any errors. On gem install rmagick, I am getting this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime.
Found partial installation at: /usr
checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.1. You must have ImageMagick 6.4.9 or later.
My question is how can I install a version > 6.4.9 of ImageMagick. Isnt yum install supposed to install latest version of ImageMagick? or should I try an older version of rmagickgem? In that case, does any one know the older version numbers of rmagick gem?
The version of ImageMagick in the CentOS yum repo is outdated. This kind person has provided updated packages: Problem installing RMagick rubygem on Centos 5
you must be root. just run
yum -y install ImageMagick-perl
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
ImageMagick / RMagick - Can't install RMagick 2.13.1. Can't find Magick-config
I am getting the following error when I try to run my dev console (MAC OS X / Snow Leopard). Does anyone know the solution?
/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in .:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
*** 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.
I solved it by Installing libmagickwand-dev
apt-get install libmagickwand-dev
gem install rmagick
Before, I was getting following error (even after installing libmagick9-dev):
apt-get install libmagick9-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libmagick9-dev is a virtual package provided by:
libmagickwand-dev 7:6.4.5.4.dfsg1-1ubuntu3.1
You should explicitly select one to install.
E: Package libmagick9-dev has no installation candidate
It seems that this problem is common in time to install the RMagick gem ... I had the same problem, and I've found the solution in this same site. Follow the link here.
Solution:
sudo apt-get install libmagick9-dev
I had a similar problem because I didn't include a library for a specific gem. Check your gems and see if they depend on a library which image gems always do.
config.gem gem_name, :lib => 'path_of_your_library'