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

**URL:** https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393
**Category:** System Administrator
**Created:** [October 25, 2020, 10:04am UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393 "2020-10-25T10:04:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Simon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/simon/32/1150_2.png) [@Simon](https://discuss.tryton.org/u/Simon)
#### Post date: [October 25, 2020, 10:04am UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393/1 "2020-10-25T10:04:30Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 25, 2020, 10:06am UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393/2 "2020-10-25T10:06:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Simon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/simon/32/1150_2.png) [@Simon](https://discuss.tryton.org/u/Simon)
#### Post date: [October 25, 2020, 10:43am UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393/3 "2020-10-25T10:43:58Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 25, 2020, 10:56am UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393/4 "2020-10-25T10:56:32Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Simon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/simon/32/1150_2.png) [@Simon](https://discuss.tryton.org/u/Simon)
#### Post date: [October 25, 2020, 2:14pm UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393/5 "2020-10-25T14:14:02Z")

</div>

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

```

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [November 24, 2020, 2:14pm UTC](https://discuss.tryton.org/t/solved-errno-2-no-such-file-or-directory-soffice-soffice/3393/6 "2020-11-24T14:14:02Z")

</div>

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