温馨提示×

怎样在debian更新liboffice

小樊
48
2026-09-02 05:02:48
栏目: 智能运维

在 Debian 上更新 LibreOffice(你写的 liboffice,应为 LibreOffice) 有几种常见方式,取决于你是怎么安装的。


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

如果你是用 apt 安装的 LibreOffice:

sudo apt update
sudo apt upgrade

如果想单独更新 LibreOffice:

sudo apt install --only-upgrade libreoffice

✅ 优点:稳定、与系统兼容
❌ 缺点:版本通常较旧


二、通过 Debian Backports 获取较新版本

Backports 提供比稳定版更新的软件:

sudo apt install -t bookworm-backports libreoffice

(把 bookworm 换成你的 Debian 版本,如 bullseye

需先确保已启用 backports(在 /etc/apt/sources.list 中)。


三、通过 LibreOffice 官方仓库(最新版本)

1. 卸载 Debian 自带版本(可选但推荐)

sudo apt remove libreoffice*

2. 添加官方源(以 Debian 12 为例)

sudo apt install wget
wget https://packages.libreoffice.org/apt/keyring.gpg -O /usr/share/keyrings/libreoffice-apt-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/libreoffice-apt-keyring.gpg] https://packages.libreoffice.org/deb/ stable main" | sudo tee /etc/apt/sources.list.d/libreoffice.list

3. 更新并安装

sudo apt update
sudo apt install libreoffice

✅ 优点:最新功能
❌ 缺点:可能与 Debian 不完全同步


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

sudo apt install snapd
sudo snap install libreoffice

五、检查当前版本

libreoffice --version

建议

  • 桌面用户:官方仓库或 backports
  • 企业/稳定环境:Debian 官方仓库
  • 需要新功能:LibreOffice 官方源

如果你告诉我:

  • Debian 版本(cat /etc/os-release
  • 安装方式(apt / 官方包 / snap)

我可以给你更精确的命令。

0