你提到的 liboffice 应该是 LibreOffice(Debian 上常见的开源办公套件)。下面是在 Debian 上安装和配置 LibreOffice 的几种常用方法。
sudo apt update
安装完整版(包含 Writer、Calc、Impress 等):
sudo apt install libreoffice
如果只想安装基础组件:
sudo apt install libreoffice-writer libreoffice-calc libreoffice-impress
sudo apt install libreoffice-l10n-zh-cn
如果你用的是 Debian Stable,但想要更新版本的 LibreOffice:
sudo apt install -t bullseye-backports libreoffice
(将 bullseye 替换为你对应的 Debian 版本,如 bookworm)
前往官网: https://www.libreoffice.org/download/
选择 Debian/Ubuntu (.deb) 版本。
tar -xvf LibreOffice_*.tar.gz
cd LibreOffice_*/DEBS
sudo dpkg -i *.deb
打开 LibreOffice →
工具 → 选项 → 语言设置 → 语言
选择中文(简体)
sudo apt install fonts-wqy-zenhei fonts-wqy-microhei
libreoffice --headless --convert-to pdf example.docx
libreoffice-gnome 可改善集成sudo apt install default-jre
sudo apt remove libreoffice
如果你说的是 其他名为 liboffice 的软件,或者是 嵌入式 / 服务器环境使用,可以补充说明一下使用场景。