[solved] [Errno 2] No such file or directory: 'soffice': 'soffice'

Hi
I have this error when trying to use PDF extensions for reports:
[Errno 2] No such file or directory: 'soffice': 'soffice'
I’m running tryton 5.6 encapsulated in a virtualenv, and libreoffice is installed with apt on the server (LibreOffice 6.1.5.2 10(Build:2))
I’m missing something?

It means that soffice executable is not found in the $PATH.

Thanks for your answer, but Libreoffice looks present for me:

echo $PATH
/root/tryton/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

which soffice
/usr/bin/soffice

I’ve tried to add a link to /usr/bin/soffice in the virtual env (venv/bin) and restart the service, but without success. What is the recommended way to add this to the $PATH?
My server is Debian 10.

Are you sure the $PATH is the one in the environment of the service?
Otherwise check the soffice is executable.

1 Like

It was indeed the PATH which was wrongly defined in the environment service.
Thansk a lot for your help!
Here is my trytond.service file in case it helps:

[Unit]
Description=Tryton server
After=syslog.target
[Service]
Type=simple
User=root
Group=root
VIRTUAL_ENV=/root/tryton/venv
ExecStart=/root/tryton/venv/bin/trytond --config /root/tryton/trytond.conf
TimeoutSec=300
Restart=always

[Install] 
WantedBy=multi-user.target

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.