2013-07-19 270 views
24

我正試圖在Mountain Lion上安裝GraphicsMagick並遇到問題。我嘗試了所有可以在博客和其他stackoverflow問題中搜索的東西,但都沒有成功。所以我把每一個命令上的錯誤都放在了一堆。請看看並幫助我。在Mac OS X上安裝GraphicsMagick 10.8

當我運行

brew install graphicsmagick 

我得到這個

Warning: Could not link jpeg. Unlinking... 
Error: The `brew link` step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
You can try again using `brew link jpeg' 

Warning: Could not link libpng. Unlinking... 
Error: The `brew link` step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
You can try again using `brew link libpng' 

,並在最後我得到

==> make install 
Warning: Could not link graphicsmagick. Unlinking... 
Error: The `brew link` step did not complete successfully 
The formula built, but is not symlinked into /usr/local 
You can try again using `brew link graphicsmagick' 

Possible conflicting files are: 
==> Summary 
    /usr/local/Cellar/graphicsmagick/1.3.18: 283 files, 10M, built in 52 seconds 

現在,如果我嘗試brew link jpegbrew link libpng我得到這個錯誤

Linking /usr/local/Cellar/jpeg/8d... Warning: Could not link jpeg. Unlinking... 

Error: Could not symlink file: /usr/local/Cellar/jpeg/8d/bin/wrjpgcom 
Target /usr/local/bin/wrjpgcom already exists. You may need to delete it. 
To force the link and overwrite all other conflicting files, do: 
    brew link --overwrite formula_name 

To list all files that would be deleted: 
    brew link --overwrite --dry-run formula_name 

如果我嘗試做brew link --overwrite jpeg它的工作的覆蓋方法。但 'brew link --overwrite libpng' 我得到這個

Linking /usr/local/Cellar/libpng/1.5.14... Warning: Could not link libpng. Unlinking... 

Error: Permission denied - /usr/local/share/man/man5/png.5 

而在此之後,當我嘗試brew link graphicsmagick我得到:

Linking /usr/local/Cellar/graphicsmagick/1.3.18... Warning: Could not link graphicsmagick. Unlinking... 

Error: Could not symlink file: /usr/local/Cellar/graphicsmagick/1.3.18/share/man/man5/quantize.5 
/usr/local/share/man/man5 is not writable. You should change its permissions. 

請幫助我。提前致謝。

+1

是什麼'釀造doctor'告訴你嗎? –

回答

31

嘗試刪除一切,重新開始:

brew uninstall imagemagick graphicsmagick libpng jpeg 
brew cleanup -s 
brew install graphicsmagick 

解決了我一些問題,最近

+12

如果您仍然遇到權限錯誤,請運行'sudo chown -R $ USER:admin/usr/local' – joet3ch

+0

感謝您在Mac上安裝圖形magick的語法。此安裝是否包含PHP的擴展?嘗試訪問應用程序,找不到Class'GMagick'。 –