温馨提示×

debian更新liboffice如何做

小樊
47
2026-09-08 05:19:17
栏目: 智能运维

在 Debian 系统上更新 LibreOffice(你写的 liboffice,正确名称是 LibreOffice),常见有几种方式,取决于你是怎么安装的。


一、通过 Debian 官方仓库更新(推荐,最安全)

如果你是用 apt 安装的:

sudo apt update
sudo apt upgrade

如果只想更新 LibreOffice:

sudo apt install --only-upgrade libreoffice

或者:

sudo apt install libreoffice

查看版本:

libreoffice --version

✅ 优点:稳定、和系统兼容好
❌ 缺点:版本通常不是最新


二、启用 Debian Backports 获取较新版本

如果你用的是稳定版 Debian(如 Debian 12 Bookworm),Backports 版本更新:

sudo apt install -t bookworm-backports libreoffice

(把 bookworm 换成你的 Debian 版本代号)


三、使用 LibreOffice 官方仓库(最新版)

适合需要最新功能的用户。

1. 添加官方源

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 集成略差


四、使用 Snap(不推荐在服务器用)

sudo apt install snapd
sudo snap install libreoffice
sudo snap refresh libreoffice

五、使用 Flatpak(桌面用户可选)

flatpak update org.libreoffice.LibreOffice

推荐做法总结

场景 建议
服务器 / 生产环境 apt upgrade
桌面稳定使用 Debian Backports
想用最新版 官方 deb 源
不想动系统 Flatpak

如果你愿意,可以告诉我:

  • Debian 版本(cat /etc/os-release
  • 当前 LibreOffice 安装方式
  • 是否服务器 or 桌面

我可以给你精确命令

0