When I run convert file.pdf
or gs
command in terminal I get the following error:
当我运行转换文件。在终端的pdf或gs命令,我得到以下错误:
dyld: Library not loaded: /usr/local/lib/libjbig2dec.0.dylib
Referenced from: /usr/local/bin/gs
Reason: image not found
I installed imagemagick and ghostscript using homebrew:
我使用homebrew安装了imagemagick和ghostscript:
brew install imagemagick
brew install gs
I have tried solutions in related questions such as reinstalling, relinking etc but I just can't get it to work.
我尝试过相关问题的解决方案,比如重新安装、重新链接等等,但是我就是不能让它工作。
I have also tried:
我也试过:
brew uninstall libtool
brew install libtool --universal
brew unlink libtool && brew link libtool --force
Homebrew, libtool, imagemagick and ghostscript are all up to date and I am running the latest version of Mavericks.
Homebrew、libtool、imagemagick和ghostscript都是最新版本,我正在运行最新版本的Mavericks。
Any ideas on how to fix this problem?
对如何解决这个问题有什么想法吗?
2 个解决方案
#1
6
I finally fixed the problem with a surprisingly simple solution:
我最终用一个令人惊讶的简单解决方案解决了这个问题:
-
I tried
brew install jbig2dec
which returnedWarning: jbig2dec-0.11 already installed
.我尝试了brew安装jbig2dec,它返回了警告:jbig2dec0.11已经安装好了。
-
I then checked to see if it it was linked:
brew link jbig2dec
which returnedWarning: Already linked: /usr/local/Cellar/jbig2dec/0.11
然后我检查它是否被链接:brew链接jbig2dec,它返回警告:已经链接:/usr/local/Cellar/jbig2dec/0.11
-
I then ran
brew unlink jbig2dec && brew link jbig2dec
to relink it.然后我运行brew unlink jbig2dec & brew link jbig2dec来重新链接它。
Voilà! GhostScript now works.
瞧!现在工作内容。
#2
0
The Ghostscript you are using has been compiled using shared libraries (which we don't reccomend but packagers are very keen on). You obviously don't have the JBIG2dec shared library on your system. As far as I can see you have 2 choices:
您正在使用的Ghostscript已经使用共享库进行编译(我们不重新编译,但是打包程序非常喜欢)。显然,您的系统上没有JBIG2dec共享库。就我所知,你有两个选择:
1) Find and install the shared library version of Jbig2dec (you can get jbig2dec from the ghostscript site I think). You may have to build it yourself and I'm doubtful that the standard build will create a shared object.
1)查找并安装Jbig2dec的共享库版本(我认为您可以从ghostscript站点获得Jbig2dec)。您可能需要自己构建它,我怀疑标准构建是否会创建一个共享对象。
2) Recompile Ghostscript from source so that it doesn't use shared libraries.
2)从源代码重新编译Ghostscript,这样它就不会使用共享库。
#1
6
I finally fixed the problem with a surprisingly simple solution:
我最终用一个令人惊讶的简单解决方案解决了这个问题:
-
I tried
brew install jbig2dec
which returnedWarning: jbig2dec-0.11 already installed
.我尝试了brew安装jbig2dec,它返回了警告:jbig2dec0.11已经安装好了。
-
I then checked to see if it it was linked:
brew link jbig2dec
which returnedWarning: Already linked: /usr/local/Cellar/jbig2dec/0.11
然后我检查它是否被链接:brew链接jbig2dec,它返回警告:已经链接:/usr/local/Cellar/jbig2dec/0.11
-
I then ran
brew unlink jbig2dec && brew link jbig2dec
to relink it.然后我运行brew unlink jbig2dec & brew link jbig2dec来重新链接它。
Voilà! GhostScript now works.
瞧!现在工作内容。
#2
0
The Ghostscript you are using has been compiled using shared libraries (which we don't reccomend but packagers are very keen on). You obviously don't have the JBIG2dec shared library on your system. As far as I can see you have 2 choices:
您正在使用的Ghostscript已经使用共享库进行编译(我们不重新编译,但是打包程序非常喜欢)。显然,您的系统上没有JBIG2dec共享库。就我所知,你有两个选择:
1) Find and install the shared library version of Jbig2dec (you can get jbig2dec from the ghostscript site I think). You may have to build it yourself and I'm doubtful that the standard build will create a shared object.
1)查找并安装Jbig2dec的共享库版本(我认为您可以从ghostscript站点获得Jbig2dec)。您可能需要自己构建它,我怀疑标准构建是否会创建一个共享对象。
2) Recompile Ghostscript from source so that it doesn't use shared libraries.
2)从源代码重新编译Ghostscript,这样它就不会使用共享库。