Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

wkhtmltopdf 0.12.1 does not work on Ubuntu 18.04 because of dependency issue #3898

Closed
Yenthe666 opened this issue Apr 30, 2018 · 20 comments
Closed

Comments

@Yenthe666
Copy link

Hi there,

When you download and try to install wkhtmltopdf you'll see that Ubuntu 18.04 does not support libpng12-0 (also see https://packages.ubuntu.com/search?keywords=libpng12-0) when you run the following commands:

sudo wget https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo gdebi --n `basename https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb`

Output:

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is not installable
Dependency is not satisfiable: libpng12-0

@ashkulz
Copy link
Member

ashkulz commented Apr 30, 2018

Ubuntu 18.04 got released 4 days ago, and you're trying to install 0.12.1 which is 3 releases old 😦

You can contribute a PR for supporting Bionic in wkhtmltopdf/packaging or see if the stretch / xenial builds work for you.

@ashkulz ashkulz closed this as completed Apr 30, 2018
@Yenthe666
Copy link
Author

Hi @ashkulz,

I know this is quite a lot behind. Sadly Odoo itself only has a full support on 0.12.1, which forces us to stick to it (see https://github.com/odoo/odoo/wiki/Wkhtmltopdf)

@ashkulz
Copy link
Member

ashkulz commented Apr 30, 2018

I'd love to know what issues Odoo is facing with the latest builds, as I'd like fix them before the 0.12.5 release.

@ashkulz
Copy link
Member

ashkulz commented May 1, 2018

You got your wish via wkhtmltopdf/packaging@52b4e17 -- is there any OS/distro/arch combination that you'd like to see packaged as well?

@Yenthe666
Copy link
Author

@ashkulz nice! No, this is the only OS/distro that I need.
Just wondering, can this then be applied on wkhtmltopdf 0.12.1 so that if I download it from https://downloads.wkhtmltopdf.org/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb it'll work or not? Wondering how to deal correctly with it in an older version.

@ashkulz
Copy link
Member

ashkulz commented May 1, 2018

See https://builds.wkhtmltopdf.org/0.12.1.3/ -- I had posted the link in the other ticket.

@Yenthe666
Copy link
Author

@ashkulz on the page https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.3 I'm missing a wkhtmltox-0.12.3_linux-trusty-amd64.deb equivalt of the one at page https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.1 (named wkhtmltox-0.12.1_linux-trusty-amd64.deb).
The 0.12.3 page has no .deb packages?

@ashkulz
Copy link
Member

ashkulz commented May 1, 2018

Not really getting what you are asking. The 0.12.3 build switched to a generic build based on CentOS 6, but it obviously doesn't work everywhere so switching back to distro-specific builds. I've created a special release 0.12.1.3 for odoo before they can confirm what's missing in 0.12.5, which was what you wanted...

@Yenthe666
Copy link
Author

@ashkulz yeah don't worry this is enough for now! Give the Odoo team some time to test and get back to you, we'll take it from there! Thanks a lot for the help / new release.

@treviser
Copy link

treviser commented Jun 1, 2018

@Yenthe666 I did succesfully install and test the new build from @ashkulz , see https://www.odoo.com/forum/help-1/question/ubuntu-18-04-lts-how-to-install-wkhtmltopdf-0-12-1-134198

@jcarlosmontoya
Copy link

Hello All,
Im trying to print pdf in Odoo 12 on Ubuntu 18.04.1 LTS Desktop 64bits and it show this error
odoo.exceptions.UserError: ("Wkhtmltopdf failed (error code: -8). Mensaje: b''", '')
I have tested with Wkhtmltopdf 0.12.1.3, 0.12.5 latest

@JKE-be
Copy link

JKE-be commented Oct 20, 2018

@jcarlosmontoya
body {
font-family: ..., "Noto Color Emoji";
}
from boostrap 4

You can install ttf-mscorefonts-installer to fix it.

@odony
Copy link

odony commented Oct 22, 2018

@jcarlosmontoya @JKE-be let's track this specific issue separately: #4149

TimLai125 pushed a commit to TimLai125/odoo-docker that referenced this issue Oct 25, 2018
- Since Ubuntu 18.04 no longer support libpng12-0 there we need to use another version of wkhtmltox 
Ref:
1. https://www.odoo.com/forum/help-1/question/ubuntu-18-04-lts-how-to-install-wkhtmltopdf-0-12-1-134198
2. wkhtmltopdf/wkhtmltopdf#3898
TimLai125 pushed a commit to qrtl/odoo-docker that referenced this issue Oct 25, 2018
* [IMP] Update Ubuntu version and new library
* [FIX] Update requirements.txt
* [FIX] Install gnupg before update source repository
* [FIX] Change wkhtmltox version
- Since Ubuntu 18.04 no longer support libpng12-0 there we need to use another version of wkhtmltox 
Ref:
1. https://www.odoo.com/forum/help-1/question/ubuntu-18-04-lts-how-to-install-wkhtmltopdf-0-12-1-134198
2. wkhtmltopdf/wkhtmltopdf#3898
* [FIX] Add wkhtmltox dependencies
@sergueikp
Copy link

@ashkulz yeah don't worry this is enough for now! Give the Odoo team some time to test and get back to you, we'll take it from there! Thanks a lot for the help / new release.

Hello Yenthee,
I experience a problem with wkhtmltox_0.12.1.4-2 with my old Odoo 8.0. Recently I moved it to Ubuntu 18.04 server,
everything works well untill I install wkhtmltopdf package, server stops to respond, but if I remove the package
server works fine again.
I followed those instructions to install the package:
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.1.4-2/wkhtmltox_0.12.1.4-2.bionic_amd64.deb
sudo apt install -f ./wkhtmltox_0.12.1.4-2.bionic_amd64.deb
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

I see in openrp-server.log this error:
version = re.search('([0-9.]+)', out).group(0)
AttributeError: 'NoneType' object has no attribute 'group'

This means that odoo can not get the version of the wkhtmltopdf package from the system!
Question is how to provide the version info to Odoo?

But if I uninstall the wkhtmltopdf package server start to work fine again.
Thank you!

@ranoaritsiky
Copy link

hello, so what is hte issue for report in Odoo. i work on Odoo 12 and i have wkhtmltopdf version 12.1.4 on my local but in server it is 12.1. and the result is very differents

@treviser
Copy link

The recommended version of wkhtmltopdf for Odoo version10 and higher is 0.12.5, see https://www.odoo.com/documentation/12.0/setup/install.html

@bitsnaps
Copy link

This error message appears also when you try to install incompatible package with your distro (like install trusty .dep package on bionic).

@ashkulz
Copy link
Member

ashkulz commented Oct 25, 2021

@bitsnaps I'm not sure why you'd use the trusty package when there's a bionic package available for 0.12.1 (I assume you want this specific version).

@bitsnaps
Copy link

@ashkulz In fact it was a mistake on my part, I had to check with uname -r the distro name, now I'm using it in a script (part of the installation of Odoo) like this:

if [ -n "$(uname -r | grep focal)"]  || [-n "$(uname -r | grep generic)"]; then
    echo 'install package...'
fi

P.S. The latest ubuntu 20 outputs *-generic from uname -r, but I think it's focal.

@ashkulz
Copy link
Member

ashkulz commented Oct 25, 2021 via email

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

No branches or pull requests

9 participants