在 Debian 系统上更新 LibreOffice(你写的 liboffice,正确名称是 LibreOffice),常见有几种方式,取决于你是怎么安装的。
如果你是用 apt 安装的:
sudo apt update
sudo apt upgrade
如果只想更新 LibreOffice:
sudo apt install --only-upgrade libreoffice
或者:
sudo apt install libreoffice
查看版本:
libreoffice --version
✅ 优点:稳定、和系统兼容好
❌ 缺点:版本通常不是最新
如果你用的是稳定版 Debian(如 Debian 12 Bookworm),Backports 版本更新:
sudo apt install -t bookworm-backports libreoffice
(把 bookworm 换成你的 Debian 版本代号)
适合需要最新功能的用户。
sudo apt install libreoffice
然后参考官方文档添加:
https://deb.libreoffice.org/
一般步骤(示例):
sudo apt install gnupg2
sudo wget https://deb.libreoffice.org/keyring.gpg -O /usr/share/keyrings/libreoffice-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/libreoffice-archive-keyring.gpg] https://deb.libreoffice.org/ libreoffice-24-2 main" | sudo tee /etc/apt/sources.list.d/libreoffice.list
sudo apt update
sudo apt install libreoffice
⚠️ 注意:官方版可能与 Debian 集成略差
sudo apt install snapd
sudo snap install libreoffice
sudo snap refresh libreoffice
flatpak update org.libreoffice.LibreOffice
| 场景 | 建议 |
|---|---|
| 服务器 / 生产环境 | apt upgrade |
| 桌面稳定使用 | Debian Backports |
| 想用最新版 | 官方 deb 源 |
| 不想动系统 | Flatpak |
如果你愿意,可以告诉我:
cat /etc/os-release)我可以给你精确命令。