“rmagick” gem installation issue

后端 未结 8 902
温柔的废话
温柔的废话 2021-01-31 01:26

I am having issue while trying to install \"rmagick\" gem on centos. Following is the output I am having. Can anyone please help me identifying what package I am missing

相关标签:
8条回答
  • 2021-01-31 01:46

    On debian (unstable) the correct packages needed to resolve this error were libmagickcore-6.q16-dev, imagemagick and libmagickwand-6-headers

    I found them by using apt-file search MagickCore.pc and apt-file search MagickWand.h

    0 讨论(0)
  • 2021-01-31 01:57

    The error message says:

    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
    

    It seems you missing no package at all, you just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture). Check with this command (from now I assume you are on a amd64 machine, if it's not the case replace lib64 with lib):

    $ find /usr/lib64/pkgconfig -name MagickCore.pc
    

    If the file is there you just have to install rmagick with this command:

    $ PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick
    
    0 讨论(0)
  • 2021-01-31 02:00

    It doesn't look like you're missing any packages. The error message is important:

    Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable

    Several of the answers on this superuser duplicate give good advice.

    0 讨论(0)
  • 2021-01-31 02:06

    try installing

      sudo apt-get install libmagickwand-dev imagemagick
    
    0 讨论(0)
  • 2021-01-31 02:08

    This ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h works for Rmagick 2.16.

    brew install imagemagick@6
    brew link --force imagemagick@6
    gem install rmagick
    
    0 讨论(0)
  • 2021-01-31 02:08

    The problem is, as the error puts it,

    Package MagickCore was not found in the pkg-config search path

    The solution is also suggested there:

    add the directory containing MagickCore.pc to the PKG_CONFIG_PATH environment variable

    So,

    1. Find MagickCore.pc location:

      sudo find / -name MagickCore.pc
      
    2. If it is not found, probably ImageMagick is not installed on your system — then install it (Google how to do it, as it depends on the OS)

    3. Save it to the ENV var like that (make sure to put the path found in step 1):

      PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
      
    4. Retry installing RMagick

    0 讨论(0)
提交回复
热议问题