【发布时间】:2019-03-29 11:26:57
【问题描述】:
Imagemagick 未正确安装在我的计算机上。我有自制软件,在尝试链接时遇到了this post中列出的相同问题
Caseys-MacBook-Pro:~ CaseyJayne$ brew link imagemagick
Linking /usr/local/Cellar/imagemagick/7.0.8-13...
Error: Could not symlink etc/ImageMagick-7/colors.xml
Target /usr/local/etc/ImageMagick-7/colors.xml already exists. You may want to remove it: rm '/usr/local/etc/ImageMagick-7/colors.xml'
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
我试过强制覆盖,但没有奏效。
Caseys-MacBook-Pro:~ CaseyJayne$ brew link --overwrite imagemagick
Linking /usr/local/Cellar/imagemagick/7.0.8-13...
Error: Could not symlink etc/ImageMagick-7/colors.xml
/usr/local/etc/ImageMagick-7 is not writable.
Caseys-MacBook-Pro:~ CaseyJayne$ brew link -f imagemagick
Linking /usr/local/Cellar/imagemagick/7.0.8-13...
Error: Could not symlink etc/ImageMagick-7/colors.xml
Target /usr/local/etc/ImageMagick-7/colors.xml
already exists. You may want to remove it:
rm '/usr/local/etc/ImageMagick-7/colors.xml'
To force the link and overwrite all conflicting files:
brew link --overwrite imagemagick
我尝试删除和移动文件
Caseys-MacBook-Pro:~ CaseyJayne$ rm '/usr/local/etc/ImageMagick-7/colors.xml'
override rw-r--r-- root/wheel for /usr/local/etc/ImageMagick-7/colors.xml? yes
rm: /usr/local/etc/ImageMagick-7/colors.xml: Permission denied
Caseys-MacBook-Pro:~ CaseyJayne$ mv '/usr/local/etc/ImageMagick-7/colors.xml' ~/Desktop/
mv: rename /usr/local/etc/ImageMagick-7/colors.xml to /Users/CaseyJayne/Desktop/colors.xml: Permission denied
我尝试将整个 etc 文件的权限更改为 755,将目录更改为 755,将文件夹更改为 644,并使用 rmdir 删除整个文件(所有内容都列在链接帖子的 cmets 中)。我用相同的输出再次完成了整个过程。我运行了 brew doctor 并按照与 imagemagick 相关的所有说明进行操作。
目前,试运行给出以下输出:
Caseys-MacBook-Pro:~ CaseyJayne$ brew link --overwrite --dry-run imagemagick
Would remove:
/usr/local/etc//usr/local/bin//usr/local/share/目录及子目录下1020个文件 例子:
/usr/local/etc/ImageMagick-7/colors.xml
/usr/local/bin/Magick++-config
/usr/local/share/ImageMagick-7/locale.xml
更改权限或删除文件的最佳选择是什么? 让我紧张的想法:手动显示隐藏的 gui 文件,将它们移动到垃圾箱,运行 brew link imagemagick,然后将它们从垃圾箱恢复到其他文件夹?
也没有任何选项可以卸载 imagemagick(一开始是 sudo 或 yum)
我使用的是 Mac OS High Sierra 10.13.6 Imagemagick 7.0.8-13 自制 1.8.0
【问题讨论】:
标签: macos imagemagick homebrew chmod