Problem:
Fetching: rmagick-2.13.2.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/officemachine1/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/gcc-4.2... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
/usr/local/bin/Magick-config: line 41: pkg-config: command not found
/usr/local/bin/Magick-config: line 47: pkg-config: command not found
/usr/local/bin/Magick-config: line 50: pkg-config: command not found
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.2. Can't find MagickWand.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.
Provided configuration options:
--with-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=/Users/officemachine1/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
Gem files will remain installed in /Users/officemachine1/.rvm/gems/ruby-1.9.2-p180/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/officemachine1/.rvm/gems/ruby-1.9.2-p180/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
Solutions:
$ brew install pkg-config
Error: Permission denied - /Users/officemachine1/Library/Caches/Homebrew/Formula/pkg-config.brewing
office-machine-1s-macbook:nationestateagents officemachine1$ sudo brew install pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.28.lion.bottle.tar.gz
################################################################## 100.0%
==> Pouring pkg-config-0.28.lion.bottle.tar.gz
🍺 /usr/local/Cellar/pkg-config/0.28: 10 files, 636K
$ rvmsudo bundle install
I hope this might be helping you to come out from the above issue.
Related
What am I missing?
Heres my brew info for imagemagick
❯ brew info imagemagick
imagemagick: stable 7.0.7-22 (bottled), HEAD
Tools and libraries to manipulate images in many formats
https://www.imagemagick.org/
/usr/local/Cellar/imagemagick/7.0.7-22 (1,527 files, 23.3MB) *
Poured from bottle on 2018-02-15 at 15:36:50
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/imagemagick.rb
==> Dependencies
Build: pkg-config ✔
Required: libtool ✔, xz ✔
Recommended: jpeg ✔, libpng ✔, libtiff ✔, freetype ✔
Optional: fontconfig ✘, little-cms ✘, little-cms2 ✘, libwmf ✘, librsvg ✘, liblqr ✘, openexr ✘, ghostscript ✘, webp ✘, openjpeg ✘, fftw ✘, pango ✘, perl ✘
==> Requirements
Optional: x11 ✘
==> Options
--with-fftw
Compile with FFTW support
--with-fontconfig
Build with fontconfig support
--with-ghostscript
Build with ghostscript support
--with-hdri
Compile with HDRI support
--with-liblqr
Build with liblqr support
--with-librsvg
Build with librsvg support
--with-libwmf
Build with libwmf support
--with-little-cms
Build with little-cms support
--with-little-cms2
Build with little-cms2 support
--with-opencl
Compile with OpenCL support
--with-openexr
Build with openexr support
--with-openjpeg
Build with openjpeg support
--with-openmp
Compile with OpenMP support
--with-pango
Build with pango support
--with-perl
Compile with PerlMagick
--with-webp
Build with webp support
--with-x11
Build with x11 support
--with-zero-configuration
Disables depending on XML configuration files
--without-freetype
Build without freetype support
--without-jpeg
Build without jpeg support
--without-libpng
Build without libpng support
--without-libtiff
Build without libtiff support
--without-magick-plus-plus
disable build/install of Magick++
--without-modules
Disable support for dynamically loadable modules
--without-threads
Disable threads support
--HEAD
Install HEAD version
Heres my gem info when trying to install
❯ gem install rmagick -v '2.13.2'
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/gems/rmagick-2.13.2/ext/RMagick
/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20180215-65975-100ukqk.rb 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.2. Can't find Magick-config in /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/bin:/Users/joshchernoff/.rvm/gems/ruby-2.3.1#global/bin:/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin:/Users/joshchernoff/.rvm/bin:/Users/joshchernoff/.asdf/bin:/Users/joshchernoff/.asdf/shims:.git/safe/../../bin:/Users/joshchernoff/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/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.
Provided configuration options:
--with-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=/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/extensions/x86_64-darwin-17/2.3.0/rmagick-2.13.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/gems/rmagick-2.13.2 for inspection.
Log file
❯ cat /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/extensions/x86_64-darwin-17/2.3.0/rmagick-2.13.2/gem_make.out
current directory: /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/gems/rmagick-2.13.2/ext/RMagick
/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20180215-65975-100ukqk.rb 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.2. Can't find Magick-config in /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/bin:/Users/joshchernoff/.rvm/gems/ruby-2.3.1#global/bin:/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin:/Users/joshchernoff/.rvm/bin:/Users/joshchernoff/.asdf/bin:/Users/joshchernoff/.asdf/shims:.git/safe/../../bin:/Users/joshchernoff/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/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.
Provided configuration options:
--with-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=/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/extensions/x86_64-darwin-17/2.3.0/rmagick-2.13.2/mkmf.log
extconf failed, exit code 1
mk file
❯ cat /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/extensions/x86_64-darwin-17/2.3.0/rmagick-2.13.2/mkmf.log
checking for Ruby version >= 1.8.5... -------------------- yes
--------------------
find_executable: checking for gcc... -------------------- yes
--------------------
find_executable: checking for Magick-config... -------------------- no
--------------------
Can't install RMagick 2.13.2. Can't find Magick-config in /Users/joshchernoff/.rvm/gems/ruby-2.3.1#impact-nw/bin:/Users/joshchernoff/.rvm/gems/ruby-2.3.1#global/bin:/Users/joshchernoff/.rvm/rubies/ruby-2.3.1/bin:/Users/joshchernoff/.rvm/bin:/Users/joshchernoff/.asdf/bin:/Users/joshchernoff/.asdf/shims:.git/safe/../../bin:/Users/joshchernoff/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin
The log file states the error: Can't find Magick-config in [PATH].
So find the Magick-config file on your filesystem and put it in your path, e.g. by running
locate Magick-config
For me that returns:
/usr/local/Cellar/imagemagick#6/6.9.9-34/bin/Magick-config
If you cannot find the Magick-config file anywhere, then find out why you don't have one.
Even when you get past that error, you will still be unable to get rmagick to work since ImageMagick 7 is not yet supported.
Related Github issues:
https://github.com/rmagick/rmagick/issues/256
https://github.com/rmagick/rmagick/issues/265
https://github.com/rmagick/rmagick/issues/271
Also here's another StackOverflow Answer that explains how to get it to work: ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h
I am trying to install ruby-qml on Ubuntu 15.10 (Wily). Apparently some prerequisites are missing:
:#> gem install qml
Building native extensions. This could take a while...
ERROR: Error installing qml:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
checking for qmake... yes
>>> building libqmlbind...
Project ERROR: Unknown module(s) in QT: qml quick
make: *** No targets specified and no makefile found. Stop.
ERROR: Failed to build libqmlbind
*** 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/bin/ruby2.1
--with-qmake
--without-qmake
--enable-debug
--disable-debug
--enable-clean
--disable-clean
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/qml-1.0.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/qml-1.0.2/gem_make.out
I already tried to install some of the usual suspects (build-essential bison openssl libreadline5 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev git-core subversion autoconf xorg-dev libgl1-mesa-dev libglu1-mesa-dev), but no luck.
There are no prerequisites mentioned for Linux in the documentation.
What is missing?
You are most probably missing Qt packages. Evident by following line of error:
Project ERROR: Unknown module(s) in QT: qml quick
Install it using:
sudo apt-get install libqt5qml5 libqt5quick5 qtdeclarative5-dev qt5-default
Installing libqt5quickparticles5 and qtdeclarative5-dev helped to get a step further. Yet, there were plenty more missing packages.
qtcreator-plugin-ubuntu has a rather exhaustive list of useful dependencies for qt5 programming. Installing it solved my troubles.
I've followed the mentioned answers here, but it didn't work alone. I found another answer here
So in my case, I've installed the following packages in order to install ruby-qml successfully.
libqt5qml5
libqt5quick5
qtdeclarative5-dev
qt5-default
qtbase5-private-dev
apt install libqt5qml5 libqt5quick5 qtdeclarative5-dev qt5-default qtbase5-private-dev
HTH
I am using mac os and I want to connect to sql server by using ruby driver. I want to use tiny_tds but it gives error for missing free_tds but it was already installed. How can pass this?
~ brew install freetds
Warning: freetds-0.91.112 already installed
~ sudo gem install tiny_tds
Building native extensions. This could take a while...
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
complete log is follows:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151013-22489-7z3h0n.rb extconf.rb
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
Extracting freetds-0.91.112.tar.gz into tmp/x86_64-apple-darwin14/ports/freetds/0.91... OK
Running git apply with /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.7.0/ports/patches/freetds/0.91/Makefile.in.diff...
Running 'patch' for freetds 0.91... OK
Running git apply with /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.7.0/ports/patches/freetds/0.91/dblib-30-char-username.diff...
Running 'patch' for freetds 0.91... OK
Running 'configure' for freetds 0.91... OK
Running 'compile' for freetds 0.91... OK
Running 'install' for freetds 0.91... OK
Activating freetds 0.91 (from /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.7.0/ports/x86_64-apple-darwin14)...
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.
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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--help
--enable-lookup
--disable-lookup
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/
--with-sybdblib
--without-sybdblib
--enable-system-freetds
--disable-system-freetds
--enable-system-iconv
--disable-system-iconv
--enable-system-openssl
--disable-system-openssl
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/
--with-sybdblib
--without-sybdblib
extconf failed, exit code 1
This is what fixed it for me:
brew install freetds
sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds
See this answer in the GitHub issue.
gem install tiny_tds -- --disable-openssl
Anyone seen this?
gem update nokogiri
Updating installed gems
Updating nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150524-28193-cqkmxr.rb extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--help
--clean
--use-system-libraries
--enable-static
--disable-static
I've just had this same problem on a fresh Ubuntu 14.04 box and it turns out there is a dependency for the zlib source (i.e. zlib.h) so you need to:
On Ubuntu or Debian:
sudo apt-get install zlib1g-dev
On Fedora, CentOS or RHEL:
sudo yum install zlib-devel
Or find the equivalent package for your operating system.
You need to install the missing dependencies, e.g.:
sudo apt-get install gcc ruby-dev libxslt-dev libxml2-dev zlib1g-dev
Then try again:
gem install nokogiri
I am having an issue on OS X Maverick when trying to install the rmagick gem. Following are some details
ImageMagic details
mairs-MacBook-Pro:social-login-in-rails umair$ convert --version
Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-07-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg ltdl lzma png xml zlib
I tried installing with and without paths but I am unable to install rmagick.
Error on installing rmagick
Umairs-MacBook-Pro:social-login-in-rails umair$ sudo C_INCLUDE_PATH=/opt/ImageMagick/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install rmagick
Building native extensions. This could take a while...
/Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr in PATH, mode 040777
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/umair/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
/usr/local/bin/Magick-config reports version 6.8.9 Q16 is installed in /usr/local/Cellar/imagemagick/6.8.9-1
/opt/ImageMagick/bin/Magick-config reports version 6.8.8 Q16 is installed in /opt/ImageMagick
Using 6.8.9 Q16 from /usr/local/Cellar/imagemagick/6.8.9-1.
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
/usr/local/bin/Magick-config: line 41: pkg-config: command not found
/usr/local/bin/Magick-config: line 47: pkg-config: command not found
/usr/local/bin/Magick-config: line 50: pkg-config: command not found
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
Can't install RMagick 2.13.2. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.
*** 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=/Users/umair/.rvm/rubies/ruby-2.1.0/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/rmagick-2.13.2/gem_make.out
For anyone having issues with this on OSX Sierra with homebrew installing imagemagick version 7+
You need to install version 6 of imagemagick in order for rmagick to work properly. These 3 commands worked for me. Install the version 6 of imagemagick and then force it to link. bundle installing rmagick should work properly afterwards.
$ brew install imagemagick#6
$ brew link imagemagick#6 --force
$ bundle install
You may need to brew uninstall imagemagick before installing and linking to #6.
I had the exact same problem, and running these on the command line fixed it (using mac):
$ brew uninstall pkg-config
$ brew install pkg-config
$ brew unlink pkg-config && brew link pkg-config
For a clean install of imagemagick#6 required for rmagic 2.16 you need to run:
$ brew uninstall imagemagick
$ brew install imagemagick#6 && brew link imagemagic#6 --force
$ brew install pkg-config
Then you yould be able to run bundle install without issues.