温馨提示×

debian更新liboffice怎么弄

小樊
37
2026-09-29 08:11:33
栏目: 智能运维

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


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

如果你是用 apt 安装的:

sudo apt update
sudo apt upgrade

如果只想更新 LibreOffice:

sudo apt install --only-upgrade libreoffice

✅ 优点:稳定、安全
❌ 缺点:版本通常不是最新


二、启用 Debian Backports(版本更新一些)

sudo apt install -t $(lsb_release -cs)-backports libreoffice

例如 Debian 12(bookworm):

sudo apt install -t bookworm-backports libreoffice

先确保已启用 backports:

sudo apt edit-sources

加入:

deb http://deb.debian.org/debian bookworm-backports main

然后:

sudo apt update

三、用官方 LibreOffice 仓库(最新版,不推荐新手)

  1. 卸载 Debian 版(避免冲突):
sudo apt remove libreoffice*
  1. 到官网下载 .deb 包: https://www.libreoffice.org/download/

  2. 解压并安装:

tar -xvf LibreOffice_*.tar.gz
cd LibreOffice_*/DEBS
sudo dpkg -i *.deb

⚠️ 可能导致系统依赖混乱,不建议服务器使用


四、用 Flatpak(简单、隔离)

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.libreoffice.LibreOffice

更新:

flatpak update

✅ 不影响系统
✅ 版本新


五、检查当前版本

libreoffice --version

推荐方案总结

使用场景 推荐方式
普通桌面用户 apt / backports
想要最新功能 Flatpak
生产/服务器 apt(稳定)

如果你告诉我:

  • Debian 版本(11 / 12 / 13)
  • 是否桌面环境
  • 当前怎么装的 LibreOffice

我可以给你精确命令。

0 踩