二进制可执行文件损坏?

发布于 2024-09-13 08:02:14 字数 370 浏览 4 评论 0原文

:/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

递刀给你 2024-09-20 08:02:14

这是 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.

眉目亦如画i 2024-09-20 08:02:14

亚历山大对于为什么你的二进制文件无法运行是正确的。这是一个 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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文