Dokku:由于wkhtmltopdf从gna下载而无法部署应用程序

问题描述:

我遇到了使用wicked_pdf和wkhtmltopdf将Digital Ocean与Dokku一起部署Rails 4应用程序的问题。我的服务器正在运行Ubuntu 14.04。Dokku:由于wkhtmltopdf从gna下载而无法部署应用程序

部署时,应用程序想要安装wkhtmltopdf;一切都很好,但它试图通过gna下载wkhtmltopdf,而gna已经不存在了。

remote: --2017-10-19 21:20:38-- http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb 

remote: Resolving download.gna.org (download.gna.org)... 78.40.125.79 

remote: Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80... 

Retrying... 

是否必须在某处更改wkhtmltopdf源代码?

任何帮助表示赞赏。

谢谢!

我相信你可以运行这个命令你的服务器上install wkhtmltopdf

In Ubuntu 12.04, open the terminal and type:

sudo add-apt-repository ppa:pov/wkhtmltopdf 
sudo apt-get update 
sudo apt-get install wkhtmltopdf 

In Ubuntu 14.04, open the terminal and type:

sudo add-apt-repository ppa:ecometrica/servers 
sudo apt-get update 
sudo apt-get install wkhtmltopdf 

and one step after this is to reboot the server or else you will get the error: wkhtmltopdf: cannot connect to X server .

In Ubuntu 16.04 and later wkhtmltopdf 0.12.2+ can be installed from the default Ubuntu repositories.

反正这个想法是,你必须安装基础上,wkhtmltopdfdocumentation,你可以在他们的网站上找到