2

我正在wkhtmltopdf 0.12.1.4 (with patched qt)使用 Django 应用程序运行django-wkhtmltopdf。在我的 PC 上运行良好,但是当我加载到 DigitalOcean VPS 时,它会生成以下错误。

命令'['/usr/bin/wkhtmltopdf', '-B', '0', '-L', '0', '-R', '0', '-T', '0', '- -allow','True','--enable-local-file-access','--encoding','utf8','--javascript-delay','2000','--page-height', '465mm', '--page-width', '297mm', '--quiet', '/tmp/wkhtmltopdf0xetqkp3.html', '-']' 返回非零退出状态 1。

当我从命令行运行它时:

/usr/bin/wkhtmltopdf -B 0 -L 0 -R 0 -T 0 --allow True --enable-local-file-access --encoding utf8 --javascript-delay 2000 --page-height 465mm --page-width 297mm --quiet /tmp/wkhtmltopdf5_sl271s.html -

我得到以下输出:

QSslSocket: cannot resolve CRYPTO_num_locks
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
Error: Failed loading page http:///tmp/wkhtmltopdf5_sl271s.html (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1 due to network error: HostNotFoundError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback

它似乎试图从文件夹http://...而不是tmp文件夹中获取文件,所以我认为我有一些设置错误。

有人可以帮忙吗?谢谢

4

0 回答 0