에 의해 Imagemagick을 설치했다고 가정
brew install imagemagick
그러나 그것은 당신의 PATH에 들어 가지 않습니다. 예를 들어, 나는 성공적으로 실행
compare
imagemagick이 PATH에 없기 때문에 : -bash: compare: command not found
.
이 명령 ls -l /usr/local/bin/compare
은
ls: /usr/local/bin/compare: No such file or directory
내 .bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# http://apple.stackexchange.com/a/53058/15504
export PATH=/usr/bin:/usr/local/bin:/opt/local/sbin:$PATH
에코 $PATH
는
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin
/usr/local/bin/
거기에 있기 때문에 괜찮은 것 같습니다 .
내 시스템의 ImageMagick-4ae1e1 님의 답변에 대한 답변
명령 brew --prefix
은 /usr/local
너무 괜찮습니다.
이 명령 brew info imagemagick
은
imagemagick: stable 6.9.0-3 (bottled), HEAD
http://www.imagemagick.org
/usr/local/Cellar/imagemagick/6.9.0-3 (1440 files, 22M)
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/imagemagick.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Required: libtool ✔, xz ✔
Recommended: jpeg ✔, libpng ✔, freetype ✔
Optional: fontconfig ✔, libtiff ✔, little-cms ✘, little-cms2 ✘, libwmf ✘, librsvg ✘, liblqr ✘, openexr ✘, ghostscript ✘, webp ✘, fftw ✘
==> Options
--enable-hdri
Compile with HDRI support
--with-fftw
Compile with FFTW support
--with-fontconfig
Build with fontconfig support
--with-ghostscript
Build with ghostscript support
--with-jp2
Compile with Jpeg2000 support
--with-liblqr
Build with liblqr support
--with-librsvg
Build with librsvg support
--with-libtiff
Build with libtiff support
--with-libwmf
Build with libwmf support
--with-little-cms
Build with little-cms support
--with-little-cms2
Build with little-cms2 support
--with-openexr
Build with openexr support
--with-perl
enable build/install of PerlMagick
--with-quantum-depth-16
Compile with a quantum depth of 16 bit
--with-quantum-depth-32
Compile with a quantum depth of 32 bit
--with-quantum-depth-8
Compile with a quantum depth of 8 bit
--with-webp
Build with webp support
--with-x11
Build with x11 support
--without-freetype
Build without freetype support
--without-jpeg
Build without jpeg support
--without-libpng
Build without libpng support
--without-magick-plus-plus
disable build/install of Magick++
--HEAD
Install HEAD version
괜찮은 것 같습니다.
나는 명령을 실행 brew link imagemagick
하고 GET
Linking /usr/local/Cellar/imagemagick/6.9.0-3...
Error: Could not symlink bin/convert
Target /usr/local/bin/convert
already exists. You may want to remove it:
rm '/usr/local/bin/convert'
To force the link and overwrite all conflicting files:
brew link --overwrite imagemagick
To list all files that would be deleted:
brew link --overwrite --dry-run imagemagick
이것은 이상해 보인다. 이 문제를 어떻게 해결할 수 있습니까?
나는 명령을 실행 brew reinstall imagemagick
하고 GET
==> Reinstalling imagemagick
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/imagemagick
Already downloaded: /Library/Caches/Homebrew/imagemagick-6.9.0-3.yosemite.bottle.tar.gz
==> Pouring imagemagick-6.9.0-3.yosemite.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/convert
Target /usr/local/bin/convert
already exists. You may want to remove it:
rm '/usr/local/bin/convert'
To force the link and overwrite all conflicting files:
brew link --overwrite imagemagick
To list all files that would be deleted:
brew link --overwrite --dry-run imagemagick
Possible conflicting files are:
/usr/local/bin/convert
/usr/local/share/man/man1/convert.1
==> Summary
? /usr/local/Cellar/imagemagick/6.9.0-3: 1440 files, 22M
심볼릭 링크에서 잘못된 점이 있습니다.
symlink에 관한 오류를 어떻게 해결할 수 있습니까?
답변
시도해야 할 것들의 순서대로 (더 나은 형식화를 위해 주석 대신 답변을 작성하고 있습니다). hash -r
각 단계 후에 실행하십시오 (bash에 있다고 가정 rehash
하고 zsh 대신 수행하십시오 . 또는 항상 새로운 쉘을 열 수 있습니다).
-
실행
brew --prefix
하고 출력이 있는지 확인하십시오/usr/local
.brew
설치되어 있지 않으면에 설치되지 않은 것 입니다/usr/local
!$(brew --prefix)/bin
당신에게 추가하십시오$PATH
. -
실행
brew info imagemagick
하고 있는지 실제로 설치되어 있는지 확인하세요; 설치 중 오류가 발생하여 단순히 성공적으로 설치되지 않았을 수 있습니다. -
brew link imagemagick
심볼릭 링크를 실행하십시오/usr/local/bin
; 어쩌면 실행 파일이 올바르게 심볼릭 링크되지 않았을 수도 있습니다. -
brew reinstall imagemagick
다시 설치하여 실행하십시오 . -
그래도 문제가 해결되지 않으면 출력 결과를 보여 주시면
brew list imagemagick
무엇이 잘못되었는지 알게됩니다.
답변
당신이 지시를 따라야하는 의견에 jjrr의 제안
brew doctor