2012-08-04 86 views
0

我最近升级到osx 10.8(Mtn Lion),现在我遇到了Imagemagick的问题。当我尝试上传文件时出现以下错误:识别错误回形针和Imagemagick

Command :: identify -format %wx%h '/var/folders/nd/1cw0mqzj0nb3jv8psz_ht9cr0000gn/T/2011Spring20120803-530-2nr1jn.jpg[0]' 
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: /var/folders/nd/1cw0mqzj0nb3jv8psz_ht9cr0000gn/T/2011Spring20120803-530-2nr1jn.jpg is not recognized by the 'identify' command.> 
Command :: identify -format %wx%h '/var/folders/nd/1cw0mqzj0nb3jv8psz_ht9cr0000gn/T/2011Spring20120803-530-2nr1jn.jpg[0]' 
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: /var/folders/nd/1cw0mqzj0nb3jv8psz_ht9cr0000gn/T/2011Spring20120803-530-2nr1jn.jpg is not recognized by the 'identify' command.> 

我卸载/重新安装了自制软件和imagemagick。我甚至添加了rmagick宝石(我以前不需要)但仍然得到上述错误。

brew install imagemagick 
Error: imagemagick-6.7.7-6 already installed 

这里是酿造医生输出:

brew doctor 
Warning: Setting DYLD_LIBRARY_PATH can break dynamic linking. 
You should probably unset it. 
Warning: You have uncommitted modifications to Homebrew's core. 
Unless you know what you are doing, you should run: 
    cd /usr/local && git reset --hard 
Warning: /usr/bin occurs before /usr/local/bin 
This means that system-provided programs will be used instead of those 
provided by Homebrew. The following tools exist at both paths: 

xml2-config 
xmlcatalog 
xmllint 
xslt-config 
xsltproc 

Consider amending your PATH so that /usr/local/bin 
occurs before /usr/bin in your PATH. 

我甚至增加了以下我的config /环境/ development.rb文件

Paperclip.options[:command_path] = "/usr/local/bin" 

我再次ImageMagick的卸载和重新安装它。现在我收到以下链接错误。

==> Installing imagemagick dependency: jpeg 
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid 
==> Downloading http://www.ijg.org/files/jpegsrc.v8d.tar.gz 
Already downloaded: /Library/Caches/Homebrew/jpeg-8d.tar.gz 
==> ./configure --prefix=/usr/local/Cellar/jpeg/8d 
==> make install 
Error: The linking step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
You can try again using `brew link jpeg' 
==> Summary 
/usr/local/Cellar/jpeg/8d: 18 files, 1.3M, built in 16 seconds 
==> Installing imagemagick dependency: libtiff 
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid 
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.2.tar.gz 
Already downloaded: /Library/Caches/Homebrew/libtiff-4.0.2.tar.gz 
==> ./configure --prefix=/usr/local/Cellar/libtiff/4.0.2 
==> make install 
Error: The linking step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
You can try again using `brew link libtiff' 
==> Summary 
/usr/local/Cellar/libtiff/4.0.2: 241 files, 3.6M, built in 24 seconds 
Error: You must `brew link jpeg' before little-cms can be installed 

当我键入酿造环节JPEG

Error: No such file or directory - /usr/local/Cellar/jpeg/8c 

当我键入酿造环节的libtiff

Error: No such file or directory - /usr/local/Cellar/libtiff/3.9.5 

因此,在总结的链接都在寻找旧版本的JPEG(8C代替8D的)和libtiff(3.9.5而不是4.0.2)

有关如何解决此问题的任何想法?

+0

这看起来很相似:http://stackoverflow.com/questions/9537011/imagemagick-问题在狮子安装与自制软件 – 2012-08-04 06:19:47

+0

我重新安装了开发工具,甚至安装了最新版本的xcode 4.4 – prodigerati 2012-08-04 13:24:41

+0

对不起,没有在家里使用mac,所以不能真正帮助。我隐约记得有一个朋友有类似的问题,下次我跟她聊天时,我可能会挖掘一些东西。 – 2012-08-04 13:45:11

回答

0

我终于可以用2条命令修复它。简单的符号链接,看起来很hackish的...

JPEG修复

cd /usr/local/Cellar/jpeg 

ln -s 8d 8c 

的libtiff修正

/usr/local/Cellar/libtiff 

ln -s 4.0.2 3.9.5 
+0

不能够链接或取消链接使用pkg配置后: 冲泡链接pkg配置 和我一样的: 在/ usr /本地/库/ pkg配置 LN -s 0.27 0.25 – 2012-08-23 20:11:07