0

最近osx10.8(Mtn Lion)にアップグレードしましたが、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.>

homebrewとimagemagickをアンインストール/再インストールしました。rmagick gem(以前は必要ありませんでした)を追加しましたが、それでも上記のエラーが発生します。

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 / environment/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

brewlinkjpegと入力すると

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

brewlinklibtiffと入力すると

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

したがって、要約すると、リンクは古いバージョンのjpeg(8dではなく8c)とlibtiff(4.0.2ではなく3.9.5)を探しています。

これを修正する方法について何かアイデアはありますか?

4

1 に答える 1

0

ようやく2つのコマンドで修正できました。単純なシンボリックリンク、かなりハックっぽいようです...

jpeg修正

cd /usr/local/Cellar/jpeg

ln -s 8d 8c

libtiffの修正

/usr/local/Cellar/libtiff

ln -s 4.0.2 3.9.5
于 2012-08-05T06:07:55.013 に答える