在 Debian 上启动 LibreOffice(你写的 liboffice 应该是 LibreOffice)有几种方式,下面按常见场景说明:
which libreoffice
或
libreoffice --version
如果没安装,用以下命令安装:
sudo apt update
sudo apt install libreoffice
(只装核心可写 libreoffice-core,但一般建议装完整版)
libreoffice
或启动具体组件:
libreoffice --writer
libreoffice --calc
libreoffice --impress
libreoffice --draw
libreoffice --headless --convert-to pdf example.docx
libreoffice --headless --convert-to pdf --outdir /tmp test.docx
确认包名:
dpkg -l | grep libreoffice
需要安装:
sudo apt install libreoffice --no-install-recommends
如果你说的是 “开机自动启动 LibreOffice” 或 “在服务器上用 LibreOffice”,可以告诉我具体使用场景,我可以给更针对性的方案。