帮助安装 wkhtmltopdf 的静态二进制文件 [英] Help installing static binary for wkhtmltopdf
问题描述
我正在尝试在 Ubuntu 服务器 10.0.4 上使用 wkhtmltopdf 的静态二进制文件.原因是它显然有一个内置的修改过的 QT,它允许我在没有 X 服务器的情况下运行 wkhtmltopdf.
I am trying to use the static binary of wkhtmltopdf on Ubuntu server 10.0.4. The reason for is that it apparently has a built in modified QT that will allow me to run wkhtmltopdf without an X Server.
结果:安装后(请参见下面的步骤),当我在终端中执行 wkhtmltopdf 时,它不会启动...只是将我返回到提示符 - 就像它运行并做了什么,没有错误但没有输出:
Result: Once installed (see steps below), when I execute wkhtmltopdf in the terminal, it does not fire up... just returns me to the prompt - like it ran and did something, no error but no output:
:/usr/bin$ wkhtmltopdf
:/usr/bin$ wkhtmltopdf
:/usr/bin$
如果我输入 args,行为相同:
Same behavior if I put args:
:/usr/bin$ wkhtmltopdf http://www.google.com test.pdf
:/usr/bin$ wkhtmltopdf http://www.google.com test.pdf
:/usr/bin$
我是不是做错了什么——我的理解是静态二进制文件应该刚刚启动.也许缺少一些依赖?有没有办法获得一些详细的输出?
Am I doing something wrong --- my understanding that the static binary should just fire up. Perhaps missing some dependency? Is there a way to get some verbose output?
这些是我遵循的步骤:
在/usr/bin:
1) 确认现有的(非静态)wkhtmltopdf 驻留在那里并执行.当我在没有参数的情况下执行它时,我会从应用程序中获得帮助/关于输出.
1) Confirmed that the existing (non-static) wkhtmltopdf resides there and that it executes. When I execute it with no args I get the help/about output from the app.
2) 将现有的 wkhtmltopdf 移出目录(重命名)
2) Moved the existing wkhtmltopdf out of the directory (renamed it)
3) 获取静态二进制文件:sudo curl -C - -O http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
3) Get the static binary: sudo curl -C - -O http: //wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
4) 解压:tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
4) Untar: tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
5) 重命名:mv wkhtmltopdf-i386 wkthtmltopdf
5) Rename: mv wkhtmltopdf-i386 wkthtmltopdf
6) 获取(显然)必要的软件包:sudo apt-get install openssl build-essential xorg libssl-dev
6) Get (apparently) necessary packages: sudo apt-get install openssl build-essential xorg libssl-dev
推荐答案
我也遇到了同样的问题.我删除了现有的 wkhtmltopdf
并按照以下步骤进行安装.
I was having the same problem. I removed the existing wkhtmltopdf
and followed the steps below and the installation worked.
首先,安装依赖项
sudo aptitude install openssl build-essential xorg libssl-dev
适用于 64 位操作系统
for 64-bit OS
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.2-static-amd64.tar.bz2
tar xvjf wkhtmltopdf-0.9.2-static-amd64.tar.bz2
chown root:root wkhtmltopdf-amd64
mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
唯一的区别是我把它放在/usr/local/bin/wkhtmltopdf
中.
The only difference is that I put it in /usr/local/bin/wkhtmltopdf
.
我希望这会有所帮助!
这篇关于帮助安装 wkhtmltopdf 的静态二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!