ImageMagick / RMagick - 无法安装 RMagick 2.13.1。找不到 Magick-config

发布于 2024-09-26 21:13:26 字数 658 浏览 8 评论 0原文

我使用脚本安装 ImageMagick http://github.com/masterkain/ImageMagick-sl

之后过了一会儿,我安装了 ImageMagick。

然后我运行 sudo gem install rmagick 并得到

Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in...

我正在 OSX Snow Leopard 中使用 Ruby 1.9.2 和 Rails 3 工作。有什么想法吗?

I used a script to install ImageMagick http://github.com/masterkain/ImageMagick-sl

After a while, I got ImageMagick installed.

Then I ran sudo gem install rmagick and got

Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in...

I'm working in OSX Snow Leopard with Ruby 1.9.2 and Rails 3. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

夏天碎花小短裙 2024-10-03 21:13:26

我遇到了同样的错误,在 ubuntu 11 上安装 libmagick9-dev 库后问题得到解决。

更新(感谢评论者 - 2012 年 12 月)

$ sudo apt-get install libmagickwand-dev$ sudo apt-get installgraphicsmagick-libmagick-dev- compat 对于 ubuntu 12

$ sudo apt-get install libmagickwand-dev$ sudo apt-get install libmagick9-dev 对于 ubuntu 11 或更低版本。

$ yum install ImageMagick-devel for centos

$brew install imagemagick for Mac OS(使用 Homebrew)

I was getting the same error and it got resolved after installing the libmagick9-dev library on ubuntu 11.

Update (Thanks to the commenters - Dec. 2012)

$ sudo apt-get install libmagickwand-dev or $ sudo apt-get install graphicsmagick-libmagick-dev-compat for ubuntu 12

$ sudo apt-get install libmagickwand-dev or $ sudo apt-get install libmagick9-dev for ubuntu 11 or below.

$ yum install ImageMagick-devel for centos

$ brew install imagemagick for Mac OS (using Homebrew)

命比纸薄 2024-10-03 21:13:26

您需要 ubuntu 下的 imagemagick 库

$ sudo apt-get install libmagickwand-dev

它包含所有缺少的 libraires,

然后运行 ​​bundle install 命令

you need the imagemagick libraries under ubuntu

$ sudo apt-get install libmagickwand-dev

it contains all missing libraires

then run bundle install command

伏妖词 2024-10-03 21:13:26

我相信您需要 Imagemagick 库。

如果您使用 Homebrew (我强烈推荐),只需执行

$ brew install imagemagick

然后重新运行捆绑安装

I believe you need the Imagemagick libraries.

If you are using Homebrew (which I'd highly recommend), simply do

$ brew install imagemagick

Then rerun bundle install

请爱~陌生人 2024-10-03 21:13:26

Mac OS Mountain Loin(使用 Homebrew)

  1. 下载并安装 http://xquartz.macosforge.org/ trac/wiki/X112.7.2
  2. brew 安装 imagemagick
  3. gem 安装 rmagick

Mac OS Mountain Loin (using Homebrew)

  1. download and install http://xquartz.macosforge.org/trac/wiki/X112.7.2
  2. brew install imagemagick
  3. gem install rmagick
水晶透心 2024-10-03 21:13:26
sudo apt-get install libmagickwand-dev 

适用于 Ubuntu 12.10

假设您已经安装了所有其他依赖项,即。

sudo apt-get install imagemagick ruby ruby-dev gem`
sudo apt-get install libmagickwand-dev 

works well for Ubuntu 12.10

This is assuming you have installed all other dependencies viz.

sudo apt-get install imagemagick ruby ruby-dev gem`
欢烬 2024-10-03 21:13:26

在 CentOS 5.7 上,我首先指定 PKG_CONFIG_PATH 来让它工作:

export PKG_CONFIG_PATH=/usr/local/src/ImageMagick-6.7.5-10/magick/

gem install rmagick

On CentOS 5.7, I got it to work by first specifying PKG_CONFIG_PATH:

export PKG_CONFIG_PATH=/usr/local/src/ImageMagick-6.7.5-10/magick/

gem install rmagick
策马西风 2024-10-03 21:13:26

对于那些在 OS X 10.8 中为我工作的人

InitializeMagick() in -lMagickCore... no; -lMagick... no; -lMagick++... no;

https://github.com/maddox/magick -安装程序

从这里:RVM + Ruby 1.9.2 + Rmagick + Lion = 系统工作,RVM 不工作

For those who got

InitializeMagick() in -lMagickCore... no; -lMagick... no; -lMagick++... no;

this worked for me in OS X 10.8: https://github.com/maddox/magick-installer

From here: RVM + Ruby 1.9.2 + Rmagick + Lion = System Works, RVM Doesn't

少钕鈤記 2024-10-03 21:13:26

最初,我开始安装 rmagick,因为当我尝试安装 libgtk2.0-dev 时,它似乎是一个依赖项。我试图安装该软件包,因为 RGtk2.0 是使用名为 rattle 的 R 软件包的要求。

无论如何,以上解决方案都不适合我在 Ubuntu 12.04 中安装。即使首先运行 sudo apt-get update 似乎也没有帮助,相关帖子也没有帮助:在 Ubuntu 上安装 rmagick

我最终发现有效的方法是使用 sudo aptitude 而不是 apt-get 进行故障排除。
https://askubuntu.com/questions/223237/unable- to- Correct-problems-you-have-held-broken-packages

我推荐使用 aptitude 来解决软件包安装问题。

Initially, I came around to installing rmagick because it seemed to be a dependency when I tried installing libgtk2.0-dev. I was trying to install that package, because the RGtk2.0 is a requirement for using R package called rattle.

Anyway, none of the above solutions worked for me in installing in my Ubuntu 12.04. Even running sudo apt-get update first didn't seem to help, nor this related posting: Installing rmagick on Ubuntu

I eventually found what works is to troubleshoot using sudo aptitude rather than apt-get.
https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages

I recommend the technique of using aptitude to work through the package installation issue.

琴流音 2024-10-03 21:13:26

在 Mac Os X 上,检查 /opt/local/bin 是否在您的 PATH 中。如果没有:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
sudo gem install rmagick

这对我有用!

On Mac Os X, check if /opt/local/bin is in your PATH. If not:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
sudo gem install rmagick

This worked for me!

叹梦 2024-10-03 21:13:26

我在 Debian Jessie 上安装 Rmagick gem 版本 2.13.2 时遇到问题。在与其他答案中的软件包进行斗争之后,我将 Rmagick gem 的版本从 2.13.2 升级到最新版本(撰写本文时为 2.16.0)。这样就安装成功了。

bundle update rmagick

I had an issue installing Rmagick gem version 2.13.2 on Debian Jessie. After fighting with the packages in the other answers, I upgraded the version of the Rmagick gem from 2.13.2 to the latest (2.16.0 at time of writing). This installed successfully.

bundle update rmagick
海的爱人是光 2024-10-03 21:13:26

如果您尝试了整个互联网的所有帖子中的所有解决方案,并在所有 Linux 或 Mac 发行版/版本(甚至在 Windows 中)中多次安装和重新安装了所有指定的软件包,但它仍然无法正常工作,请关闭您的终端并再次打开它。有时,即使您重新加载所有 shell 环境,只有在我重新打开终端后,捆绑包安装才成功完成。

If you tried all solutions, of all posts of whole Internet, have installed and reinstalled many times all indicated packages in all Linux or Mac distributions/versions (even in Windows) and it still not working, close your terminal and open it again. Some times, even if your reload all shell environment, only after I reopen the terminal the bundle install was successfully completed.

眼眸里的那抹悲凉 2024-10-03 21:13:26

经过几天的搜索,我的问题与一些缺失的库有关,安装 gem 的库是这个:

brew install pkg-config

在此之后,我再次进行了捆绑安装,它成功了。

After several days of searching, my problema was related to some missing libraries, and the one that get the gem installed was this one:

brew install pkg-config

after this I did my bundle install again and it worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文