首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在pkg- MagickCore搜索路径中找不到包配置

在pkg- MagickCore搜索路径中找不到包配置
EN

Stack Overflow用户
提问于 2016-07-05 17:37:28
回答 4查看 23.5K关注 0票数 31

我正在尝试安装rmagick,但它总是要求提供未配置的PKG_CONFIG_PATH

这在我身上发生了很多次,所以我把这个作为一个问题发布出来,并为其他面临同样问题的人回答我自己。

代码语言:javascript
运行
复制
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
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2016-07-05 17:38:04

安装时rmagick gem找不到PKG_CONFIG_PATH。我们需要知道ImageMagick的路径在哪里。在狂欢中添加总是更好的。

代码语言:javascript
运行
复制
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
票数 27
EN

Stack Overflow用户

发布于 2016-09-19 00:45:11

我也有同样的问题。这是我的工作(Ubuntu):

代码语言:javascript
运行
复制
sudo apt-get install libmagickwand-dev
票数 62
EN

Stack Overflow用户

发布于 2019-01-30 16:29:57

这为我解决了这个问题(适用于ubuntu 18.04):

代码语言:javascript
运行
复制
sudo apt-get install libmagick++-dev
票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38200015

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档