Help

0

"Unable to find Wkhtmltopdf on this system" even though "whereis wkhtmltopdf" shows it is

Avatar
The Secret Garden

Hi,

I have installed Odoo 14 Community on DigitalOcean.com and I installed Wkhtmltopdf and I am getting error when I try to print invoices "Unable to find Wkhtmltopdf on this system. The PDF can not be created"

Please help, and I appreciate any help,

Majed

Best regards


~# lsb_release -a
...

Description: Ubuntu 20.04.1 LTS
...


~# wkhtmltopdf -V

wkhtmltopdf 0.12.6 (with patched qt)

~# whereis wkhtmltopdf

wkhtmltopdf: /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf

~# wkhtmltopdf http://google.com google.pdf

Loading pages (1/6)

Counting pages (2/6)                                               

Resolving links (4/6)                                                       

Loading headers and footers (5/6)                                           

Printing pages (6/6)

Done 

~# sudo service odoo-server status

odoo-server.service - LSB: Enterprise Business Applications

     Loaded: loaded (/etc/init.d/odoo-server; generated)

     Active: active (running) since Thu 2020-11-19 17:34:08 UTC; 1h 10min ago

       Docs: man:systemd-sysv-generator(8)

    Process: 705170 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)

      Tasks: 3 (limit: 2345)

     Memory: 84.4M

     CGroup: /system.slice/odoo-server.service

             └─705173 python3 /odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf


Nov 19 17:34:08 ubuntu-s-1vcpu-2gb-blr1-01 systemd[1]: Starting LSB: Enterprise Business Applications...

Nov 19 17:34:08 ubuntu-s-1vcpu-2gb-blr1-01 odoo-server[705170]: Starting odoo-server: odoo-server.

Nov 19 17:34:08 ubuntu-s-1vcpu-2gb-blr1-01 systemd[1]: Started LSB: Enterprise Business Applications.




1 Comment
Avatar
Discard
Avatar
The Secret Garden
-

Hi Paresh,

Thank you for your replay.

I uninstalled version 0.12.6 and Installed 0.12.5-1 without any errors by running the following code and The problem still not fixed, any idea how to fix it?  

Thank you for your help,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~# sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb

~# sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb

~# sudo apt-get install -f

~# sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin

~# sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

~# sudo service odoo-server restart

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~# wkhtmltopdf -V

wkhtmltopdf 0.12.5 (with patched qt)

~# whereis wkhtmltopdf

wkhtmltopdf: /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf

~# wkhtmltopdf http://google.com google.pdf

Loading pages (1/6)

Counting pages (2/6)                                               

Resolving links (4/6)                                                       

Loading headers and footers (5/6)                                           

Printing pages (6/6)

Done  

~cat /etc/odoo-server.conf

http_port = 8069

proxy_mode = True

limit_time_cpu = 3600

limit_time_real = 3600

logfile = /var/log/odoo/odoo-server.log

addons_path=/odoo/odoo-server/addons,/odoo/custom/addons

~# cat /etc/init.d/odoo-server
.....

PATH=/usr/bin:/usr/local/bin:/sbin:/bin:/usr/sbin
.....



~# sudo service odoo-server status

odoo-server.service - LSB: Enterprise Business Applications

     Loaded: loaded (/etc/init.d/odoo-server; generated)

     Active: active (running) since Sat 2020-11-21 18:11:09 UTC; 4min 12s ago

       Docs: man:systemd-sysv-generator(8)

    Process: 770506 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)

      Tasks: 3 (limit: 2345)

     Memory: 92.9M

     CGroup: /system.slice/odoo-server.service

             └─770509 python3 /odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf


Nov 21 18:11:09 ubuntu-s-1vcpu-2gb-blr1-01 systemd[1]: Starting LSB: Enterprise Business Applications...

Nov 21 18:11:09 ubuntu-s-1vcpu-2gb-blr1-01 odoo-server[770506]: Starting odoo-server: odoo-server.

Nov 21 18:11:09 ubuntu-s-1vcpu-2gb-blr1-01 systemd[1]: Started LSB: Enterprise Business Applications.

2 Answers
0
Avatar
The Secret Garden
Best Answer

I just deleted the wkhtmltopdf file in /etc/apt/sources.list.d and reinstall wkhtmltopdf 0.12.6
it works

problem solved

Thank you

Avatar
Discard
0
Avatar
Paresh Wagh
Best Answer

Try installing wkhtmltopdf 0.12.5-1 which is the recommended version for Odoo

https://github.com/odoo/odoo/wiki/Wkhtmltopdf

Avatar
Discard