Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install fileutils Rubygem on ubuntu 14.04 lts

When trying to install fileutils gem I get following output:

No package 'MagickCore' found
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
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
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 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/aditya/.rvm/rubies/ruby-2.1.1/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /home/aditya/.rvm/gems/ruby-2.1.1/gems/rmagick-2.13.4 for inspection.
Results logged to /home/aditya/.rvm/gems/ruby-2.1.1/extensions/x86_64-linux/2.1.0/rmagick-2.13.4/gem_make.out

It looks like there is some issue with rmagick, imagemagick is installed properly and on trying to install rmagick gem I get error that a package is missing: libmagickwand-dev

When I try to install this package I get following error:

The following packages have unmet dependencies:
 libmagickwand-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
like image 694
whizcreed Avatar asked Nov 29 '14 16:11

whizcreed


2 Answers

Running sudo apt-get install libmagickwand-dev solved the problem for me.

like image 80
Lesha Pipiev Avatar answered Dec 06 '22 19:12

Lesha Pipiev


Install these two packages

sudo apt-get install libmagickwand-dev
sudo apt-get install imagemagick

In your Gemfile add these lines

# To perform file operations
gem 'rmagick'
gem 'fileutils', '~> 0.7'

Then you can install the gems by running

bundle install

And as an output of the command you should see something similar to this...

...
Installing rmagick 2.13.4
Installing fileutils 0.7
....
Your bundle is complete!
like image 36
Mauricio Gracia Gutierrez Avatar answered Dec 06 '22 19:12

Mauricio Gracia Gutierrez