我如何在OS X 10.9上使用ghost4j [英] How can i use ghost4j on OS X 10.9

查看:117
本文介绍了我如何在OS X 10.9上使用ghost4j的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想在OS X 10.9上使用ghost4j时,我看到此错误:

When i want to use ghost4j on OS X 10.9, i see this error:

无法加载库'gs':dlopen(libgs.dylib,9):找不到图像

Unable to load library 'gs': dlopen(libgs.dylib, 9): image not found

我已经使用此网站在我的Macbook上安装了ghostscript库. 我该如何解决这个问题.由于某种原因,我无法使用port和brew安装ghostscript.

I have installed ghostscript library on my macbook using this site. how can i fix this problem. I can not install ghostscript using port and brew for some reason.

推荐答案

首先,您需要查找由安装程序包安装的文件libgs.dylib 从源代码编译libgs.dylib库,并记下安装位置.

First you need to find the file libgs.dylib which was installed by the installer package compile the libgs.dylib library from source, and make a note of where you installed it to.

希望它应该已安装到标准库位置,并且您无需执行其他任何操作.如果不是,则需要设置环境变量DYLD_LIBRARY_PATH.在终端中,可以通过键入export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/directory并将/directory替换为包含libgs.dylib的实际目录的完整路径来完成.键入此命令后,在该终端中,如果您运行您的应用程序,它应该可以工作.要使其永久生效,您需要在~/.bash_profile中添加export命令.或者要使其对计算机上的所有用户帐户生效,您可以将其添加到/etc/profile.

Hopefully it should have been installed to a standard library location, and there should be nothing more you need to do. If not, you need to set the environment variable DYLD_LIBRARY_PATH. In a terminal this would be done by typing export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/directory, replacing /directory with the full path of the actual directory containing libgs.dylib. After typing this, in that terminal, if you run your application, it should work. To make it take effect permanently you would need to add the export command to your ~/.bash_profile. Or to make it take effect for all user accounts on your computer, you could add it to your /etc/profile.

如果这不起作用,我想Ghostscript库可能是32位的-我认为您需要一个64位的库.

If this doesn't work, I suppose the Ghostscript library could be 32-bit - you would need a 64-bit library I think.

这篇关于我如何在OS X 10.9上使用ghost4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆