二进制可执行文件损坏?
:/usr/local/bin# file wkhtmltopdf
wkhtmltopdf: Mach-O executable i386
该文件将不会运行。我尝试删除并重新安装但没有成功。我查看了权限(如下),它们看起来也不错:
-rwxr-xr-x 1 root root 13817060 Aug 9 13:07 wkhtmltopdf
当我运行 wkhtmltopdf 时,出现以下错误:
wkhtmltopdf
-bash: /usr/local/bin/wkhtmltopdf: cannot execute binary file
:/usr/local/bin# file wkhtmltopdf
wkhtmltopdf: Mach-O executable i386
This file will not run. I have tried removing and reinstalling with no success. I have looked at the permissions (below) and they seem ok too:
-rwxr-xr-x 1 root root 13817060 Aug 9 13:07 wkhtmltopdf
When I run wkhtmltopdf I get the error below:
wkhtmltopdf
-bash: /usr/local/bin/wkhtmltopdf: cannot execute binary file
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 Mac OS X 的可执行格式,您需要为 Linux 编译的二进制文件才能运行它。
That is the executable format for Mac OS X, you need a binary compiled for linux to be able to run it.
亚历山大对于为什么你的二进制文件无法运行是正确的。这是一个 OS X 二进制文件,你不能
在 Linux 系统上运行它们。您需要一个 Linux 二进制文件。
如果您正在运行测试或不稳定,只需运行 apt-get install wkhtmltopdf 即可使用打包系统安装它。
您还可以从他们的网站尝试这些预打包版本:
Alexander is correct in why the binary you have won't run. It's an OS X binary and you can't
run those on Linux systems. You need a Linux binary.
If you are running testing or unstable, just run
apt-get install wkhtmltopdf
to install it using the packaging system.You can also try these prepackaged versions from their website: