web-dev-qa-db-fra.com

Le paquet MagickCore n'a pas été trouvé dans le chemin de recherche de pkg-config

J'essayais d'installer rmagick et il demande toujours pour PKG_CONFIG_PATH non configuré. 

Cela m’est arrivé à plusieurs reprises, c’est pourquoi j’en parle comme un problème et je réponds à tous ceux qui font face au même problème.

User-MacBook-Pro:rsscom macuser$ gem install rmagick -v '2.13.3'
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

    /Users/macuser/.rvm/rubies/Ruby-2.2.0/bin/Ruby -r ./siteconf20160705-63310-klqxmw.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
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
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 0.0.0. 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=/Users/macuser/.rvm/rubies/Ruby-2.2.0/bin/$(Ruby_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /Users/macuser/.rvm/gems/Ruby-2.2.0/gems/rmagick-2.13.3 for inspection.
Results logged to /Users/macuser/.rvm/gems/Ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rmagick-2.13.3/gem_make.out
17
Ashwin Yaprala

rmagick gem ne peut pas trouver PKG_CONFIG_PATH pendant l'installation. Nous devons savoir où se trouve le chemin pour ImageMagick. Il est toujours préférable d'ajouter à la bash.

export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
21
Ashwin Yaprala

J'ai le même problème. Ce travail pour moi (Ubuntu):

Sudo apt-get install libmagickwand-dev
31
Goko Gorgiovski

CentOS

yum install ImageMagick-devel
2
XiaoChi

Cela vient de résoudre le problème pour moi:

Sudo apt-get install libmagick++-dev
0
FMM