When I try to install rmagick on OSX Mavericks, I get this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/adam/.rvm/gems/ruby-2.0.0-p353/bin:/Users/adam/.rvm/gems/ruby-2.0.0-p353#global/bin:/Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin:/Users/adam/.rvm/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:#/usr/local/bin:/usr/local/mysql-5.6.13-osx10.7-x86_64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/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/adam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /Users/adam/.rvm/gems/ruby-2.0.0-p353/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/adam/.rvm/gems/ruby-2.0.0-p353/extensions/x86_64-darwin-13/2.0.0/rmagick-2.13.2/gem_make.out
In ~/.bash_profile is following:
MYSQL=/usr/local/mysql/bin
export PATH=$PATH:$MYSQL
#export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
export PG_DUMP="/Applications/Postgres.app/Contents/MacOS/bin/"
#PATH=$PG_DUMP:$PATH
#export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH=/usr/local/bin:$PATH
There's no such a path as is in the error output, where does it comes from and how can I fix it?
Thank you.
Do you have ImageMagick installed? Install it via homebrew:
brew install imagemagick
Related
I'm running Debian WSL 2 and I cannot install any version of RMagick.
I installed imagemagick#6 via homebrew and after installation I saw following:
imagemagick#6 is keg-only, which means it was not symlinked into /home/linuxbrew/.linuxbrew,
because this is an alternate version of another formula.
If you need to have imagemagick#6 first in your PATH, run:
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/imagemagick#6/bin:$PATH"' >> ~/.zshrc
For compilers to find imagemagick#6 you may need to set:
export LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/imagemagick#6/lib"
export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/imagemagick#6/include"
For pkg-config to find imagemagick#6 you may need to set:
export PKG_CONFIG_PATH="/home/linuxbrew/.linuxbrew/opt/imagemagick#6/lib/pkgconfig"
I followed all the instructions above
then I tried to install RMagick via gem install rmagick -v '4.1.2' --source 'https://rubygems.org/'
and got output:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /home/ketch/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rmagick-4.1.2/ext/RMagick
/home/ketch/.asdf/installs/ruby/2.7.1/bin/ruby -I /home/ketch/.asdf/installs/ruby/2.7.1/lib/ruby/2.7.0 -r ./siteconf20211106-21975-1odkmjc.rb extconf.rb
checking for brew... yes
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes
ERROR: Can't install RMagick 4.1.2. Can't find ImageMagick with pkg-config
*** 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/ketch/.asdf/installs/ruby/2.7.1/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ketch/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/rmagick-4.1.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/ketch/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rmagick-4.1.2 for inspection.
Results logged to /home/ketch/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/rmagick-4.1.2/gem_make.out
I tried to install rmagick on my WSL debian, WSL ubuntu, and on Manjaro through virtual machine, everytime the same error
I tried to install ruby hacker gems but its giving me an error
The error says-
'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'
My ruby version currently installed is
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux-gnu]
gems version is
3.2.5
here is the whole error
ERROR: Error installing hacker-gems:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.7.0/gems/tiny_tds-2.1.5/ext/tiny_tds
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20210802-4029-18iz6u.rb extconf.rb
looking for freetds headers in the following directories:
- /opt/local/include
- /opt/local/include/freetds
- /usr/local/include
- /usr/local/include/freetds
looking for freetds library in the following directories:
- /opt/local/lib
- /opt/local/lib/freetds
- /usr/local/lib
- /usr/local/lib/freetds
checking for sybfront.h... no
checking for sybdb.h... no
checking for tdsdbopen() in -lsybdb... no
checking for dbanydatecrack() in -lsybdb... no
Failed! Do you have FreeTDS 0.95.80 or higher installed?
*** 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/$(RUBY_BASE_NAME)2.7
--help
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/lib
--with-sybdb-dir
--without-sybdb-dir
--with-sybdb-include
--without-sybdb-include=${sybdb-dir}/include
--with-sybdb-lib
--without-sybdb-lib=${sybdb-dir}/lib
--with-sybdblib
--without-sybdblib
--with-sybdblib
--without-sybdblib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/tiny_tds-2.1.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.7.0/gems/tiny_tds-2.1.5 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/tiny_tds-2.1.5/gem_make.out
I tried installing various dependencies as well as scouring through the web but to no avail
What am i missing?
I solved this error installing the ruby-dev
Ubuntu:
sudo apt-get install ruby-dev
Recently I got the following errors when I tried to install the uchardet GEM in MacOS catalina,Even I specific the ICU version and lib, it still doesn't work, anyone have ideas?
Installing uchardet 0.2.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/xxx/.rvm/gems/ruby-2.6.4/gems/uchardet-0.2.0/ext
/Users/xxx/.rvm/rubies/ruby-2.6.4/bin/ruby -I /Users/xxx/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0 -r ./siteconf20200420-38494-q9y0cf.rb extconf.rb
Could not find ICU libraries and/or development tools. Try installing "icu-devtools" or "icu" package.
*** 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/xxx/.rvm/rubies/ruby-2.6.4/bin/$(RUBY_BASE_NAME)
extconf failed, exit code 1
Gem files will remain installed in /Users/xxx/.rvm/gems/ruby-2.6.4/gems/uchardet-0.2.0 for inspection.
Results logged to /Users/xxx/.rvm/gems/ruby-2.6.4/extensions/x86_64-darwin-19/2.6.0/uchardet-0.2.0/gem_make.out
I was able to reproduce this on my mac:
I fixed this error by re-installing and re-linking icu4c
brew install icu4c
brew link icu4c --force # if it shows you an error and tells you to add the path manually add them
restarted my terminal then re-installed the gem (i also tried this)
you will know it's working when you have which icu-config working https://github.com/dmgk/uchardet/blob/506105c5322fe3cde7ce3e2b2868f875b9b57230/ext/extconf.rb#L3-L6
however now i have another error uchardet.c:2:10: fatal error: 'unicode/ucsdet.h' file not found i do think the gems needs better configuration around this
I am installing gem rmagick in Ubuntu 14.04 OS but I am getting error as,
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/home/jignesh/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150317-9073-18x8ncb.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.4. 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
--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/jignesh/.rvm/rubies/ruby-2.1.5/bin/ruby
extconf failed, exit code 1
I have tried so many solutions provided on Stackoverflow as well as on other sites but no one worked for me.
So please any one provide me solution.
Thanks in advance.
You should install magickwand package to fix this problem:
sudo apt-get install libmagickwand-dev
I am not getting error while installing gem ruby-odbc -v'0.99995'.
Please help me to solve this error. I try lot of things but it didn't worked.
Building native extensions. This could take a while...
ERROR: Error installing ruby-odbc:
ERROR: Failed to build gem native extension.
/home/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
checking for version.h... yes
checking for sql.h... no
*** 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/sheetal/.rvm/rubies/ruby-1.8.7-p371/bin/ruby
--with-odbc-dir
--without-odbc-dir
--with-odbc-include
--without-odbc-include=${odbc-dir}/include
--with-odbc-lib
--without-odbc-lib=${odbc-dir}/lib
ERROR: sql.h not found
I am using ruby 1.8.7 & rails2
Have you tried installing the unix odbc development files?
sudo apt-get install unixodbc-dev
If you're on OS X and having this issue try
brew install unixodbc
Then you should be able to
gem install ruby-odbc