wkhtmltopdf / packaging

Packaging of wkhtmltopdf releases
https://wkhtmltopdf.org/downloads.html#stable
305 stars 138 forks source link

Not able install or package myself #59

Closed mojidabckuu closed 4 years ago

mojidabckuu commented 4 years ago

Opened this issue due to missing troubleshooting guide. Got Ubuntu bionic instance in DO. Inside a docker container tried to install it using apt-get install and when I run got

QXcbConnection: Could not connect to display 
Aborted (core dumped)

Tried to build a binary myself using the installation guide and performed next commands on machine with client ubuntu version

git clone --recurse-submodules https://github.com/wkhtmltopdf/wkhtmltopdf
git clone --recurse-submodules https://github.com/wkhtmltopdf/packaging
cd packaging
sudo ./build package-docker bionic-amd64 ../wkhtmltopdf

It take some time and at the end I found targets folder with some result. Tried again to convert a file from html to pdf and got the same error output. But on the client ubuntu version it works fine. What I am doing wrong?

UPDATE: If I download tar from https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz and unpack then everything works fine

UPDATE 2: Downloaded generic-amd64 truncates html and renders with errors. Splits into 2 pages and right side is truncated

Screenshot 2020-03-25 at 23 44 43 Screenshot 2020-03-25 at 23 44 38

UPDATE 3 If I try to download from here https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-dev-20200127/wkhtmltox_0.12.6-0.20200125.25.dev.ba575ea.bionic_amd64.deb and install using dpkg -I .. then I get

dpkg: dependency problems prevent configuration of wkhtmltox:
 wkhtmltox depends on libjpeg-turbo8; however:
  Package libjpeg-turbo8 is not installed.
 wkhtmltox depends on xfonts-75dpi; however:
  Package xfonts-75dpi is not installed.

dpkg: error processing package wkhtmltox (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 wkhtmltox

UPDATE 4 Tried deb from the latest dev release on exiting 14.04 Ubuntu instance and works fine

ashkulz commented 4 years ago

Use apt-get install -f to install the required dependencies.

mojidabckuu commented 4 years ago

I tried this magic command and it doesn’t work. Inside docker the problem is about to find the repo with missing does. Even if I manually added to source.list Ubuntu repos then it returns an error regarding another missing library. Seems it has that many deps on shared preinstalled libs that I wouldn’t able to manage it myself. I finished with 12.4 version and a symbolic link to the binary inside unzipped directory with lib folder and others alongside. Installation through -f works only on original VPS.