Check if wkhtmltopdf is installed successfully
wkhtmltopdf -V
Version 18 recommends the following version: wkhtmltopdf 0.12.6 (with patched qt)
If not, uninstall and then re-download and install
Remove
sudo apt-get remove wkhtmltopdf
Download
Installation
sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb
Error handling method E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Step 1: Install the old version of libssl1.1Since libssl1.1 has been removed in newer versions of Ubuntu, we need to manually install the appropriate version.
First, download the appropriate libssl1.1 package: For Ubuntu 20.04 or 18.04 systems, libssl1.1 can still be downloaded from the following link: Download the .deb package of libssl1.1 (for Ubuntu 20.04)
You can also directly use the wget command to download:
wget https://launchpad.net/ubuntu/+archive/primary/+files/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
Install libssl1.1:
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
Step 2: Install the missing font package xfonts-75dpi is a basic package for some fonts.
You can use the following command to install it: sudo apt-get install xfonts-75dpi
Step 3: Fix dependencies and complete installation
Run the following command to fix all dependencies:
sudo apt --fix-broken install
Try installing again
wkhtmltox:sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
Step 4: Verify Installation
After installation is complete, you can run the following command to verify the installation:
wkhtmltopdf -V
You should see the following output, indicating that wkhtmltopdf has been installed successfully:
wkhtmltopdf 0.12.6 (with patched qt)
