Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wkhtmltopdf setup issue on Ubuntu 22.04 Jammy #24

Open
unrooty opened this issue Apr 23, 2024 · 0 comments
Open

Wkhtmltopdf setup issue on Ubuntu 22.04 Jammy #24

unrooty opened this issue Apr 23, 2024 · 0 comments

Comments

@unrooty
Copy link

unrooty commented Apr 23, 2024

Problem

Hello! Cloud66 has wkhtmltopdf snippet which is broken for Ubuntu 22.04 Jammy. Script tries to install wkhtmltox_0.12.6-1.jammy_amd64.deb package which doesn't exist (was not compiled for Ubuntu 22.04 Jammy)

Due to that fact we are getting the following error during server build:
Screenshot 2024-04-23 at 12 14 35.

Solution

It is needed to change wkhtmltopdf snippet to the following one:

# {{Description: This deploy hook will run the following code snippet to automate the installation of wkhtmltopdf.}}
# download the latest wkhtmltopdf version
curl -sL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.$(lsb_release -cs)_amd64.deb >> /tmp/wkhtmltopdf.deb
# install the wkhtmltopdf package
sudo dpkg -i /tmp/wkhtmltopdf.deb
# install the package dependencies
sudo apt install --fix-broken -y

I can open a PR that will contain this script rework but not sure about backwards compatibility 'cause your customers could probably still use Ubuntu 14 or Ubuntu 16. Probably a solution could be to check (lsb_release -cs) and use direct links for each release to the latest compiled wkhtmltopdf.deb packages instead of the dynamic links.

Another important thing is that https://github.com/wkhtmltopdf/packaging repository was archived. So probably it is needed to simply use sudo apt -y install wkhtmltopdf command to install this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant