在 Debian 系统中配置 LibreOffice,通常包括安装、界面语言、默认文件关联、Java 环境、自动保存、宏权限等几个方面。下面按常见需求一步步说明(适用于 Debian 11/12,其他版本类似)。
sudo apt update
sudo apt install libreoffice
如果你只需要基础组件(Writer / Calc / Impress):
sudo apt install libreoffice-writer libreoffice-calc libreoffice-impress
sudo apt install libreoffice-l10n-zh-cn
sudo apt install libreoffice-help-zh-cn
安装后:
xdg-mime default libreoffice-writer.desktop text/plain
xdg-mime default libreoffice-calc.desktop application/vnd.ms-excel
LibreOffice 的 Base、部分导出、宏 需要 Java。
sudo apt install default-jre
或完整 JDK:
sudo apt install default-jdk
建议:
如果你需要运行宏:
⚠️ 不建议直接设为“低”,有安全风险。
sudo apt install fonts-wqy-zenhei fonts-wqy-microhei fonts-noto-cjk
fc-cache -fv
sudo apt remove --purge libreoffice*
sudo apt autoremove
locale
zh_CN.UTF-8如果你愿意,我也可以帮你:
你现在是 桌面使用 还是 服务器环境?