Ruby-on-rails 错误原始错误:未安装 ImageMagick/GraphicsMagick
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31193495/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ERROR Original Error: ImageMagick/GraphicsMagick is not installed
提问by SupremeA
I have an app that is using Imagemagick, but I had to rebuild my environment and now when I try and upload an avatar (which is why I am using Imagemagick), it keeps giving me the following error when I try to add an image.
我有一个使用 Imagemagick 的应用程序,但我必须重建我的环境,现在当我尝试上传头像(这就是我使用 Imagemagick 的原因)时,当我尝试添加图像时,它不断给我以下错误。
Avatar Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: ImageMagick/GraphicsMagick is not installed
I installed it in the folder that holds my app, but it seems as though the app is not recognizing the install. Is there a way to make the app recognize the minimagick or did I install it in the wrong place or am I completely off.
我将它安装在保存我的应用程序的文件夹中,但似乎该应用程序无法识别安装。有没有办法让应用程序识别 minimagick 或者我是否在错误的地方安装了它,或者我完全关闭了。
-UPDATE-
-更新-
I uninstalled minimgick and reinstalled, but still get the same error, although it shows that it is installed. Here are my versions...
我卸载了 minimgick 并重新安装,但仍然出现相同的错误,尽管它表明它已安装。这是我的版本...
-imagemagick-6.9.1-6
-imagemagick-6.9.1-6
-ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
-ruby 2.2.1p85 (2015-02-26 修订版 49769) [x86_64-darwin14]
-Rails 4.0.10
-Rails 4.0.10
-running on a mac
- 在 mac 上运行
回答by Arslan Ali
You need to install libmagickwand-devin order to successfully complete the rmagickgem. Following command will do the job for you:
您需要安装libmagickwand-dev才能成功完成rmagickgem。以下命令将为您完成这项工作:
sudo apt-get install libmagickwand-dev
On a Mac, you would run the following command:
在 Mac 上,您将运行以下命令:
brew install imagemagick # it requires you to install Homebrew first.
回答by Szymon Rut
on Ubuntu:
在 Ubuntu 上:
sudo apt-get install imagemagick
回答by Nick
I had the same issue and solved it with:
我有同样的问题并解决了它:
sudo apt-get update
sudo apt-get update
sudo apt-get install imagemagick --fix-missing
sudo apt-get install imagemagick --fix-missing
回答by Jaswinder
You just need to update your system libraries. try this:-
您只需要更新您的系统库。尝试这个:-
sudo apt-get -f install
sudo apt-get -f install
and then you would be able to upload it.
然后你就可以上传它了。
回答by kurt
Just an update on my experience. I recently had the same issue with the latest version of ImageMagick 7.0.8-7. I fixed the problem by just downgrading to 6.9.... This solved the issue for some reason.
只是更新我的经验。我最近在最新版本的 ImageMagick 7.0.8-7 上遇到了同样的问题。我只是通过降级到 6.9 解决了这个问题......这出于某种原因解决了这个问题。
- I was on Windows btw. x64.
- 顺便说一句,我在 Windows 上。x64。
回答by Ivan Verevkin
sudo apt-get install graphicsmagick-imagemagick-compat
sudo apt-get install graphicsmagick-imagemagick-compat
回答by iGian
For who's on Cloud9encountering the error:
对于在Cloud9 上遇到错误的人:
MiniMagick::Invalid (You must have ImageMagick or GraphicsMagick installed)
MiniMagick::Invalid(您必须安装 ImageMagick 或 GraphicsMagick)
this solved for me:
这为我解决了:
sudo yum install ImageMagick

