在 Debian 系统中,LibreOffice 通常直接来自 Debian 官方软件源,而不需要额外添加第三方源。
LibreOffice 已经包含在 Debian 的 main 仓库中,你只需要确保 /etc/apt/sources.list 中包含类似下面的内容(以 Debian 12 bookworm 为例):
deb http://deb.debian.org/debian bookworm main
deb http://security.debian.org/debian-security bookworm-security main
然后执行:
sudo apt update
sudo apt install libreoffice
这会安装 Debian 官方打包的 LibreOffice(版本通常较稳定,但可能不是最新)。
如果你想要 最新版本的 LibreOffice(如 LibreOffice 24.2、25.2 等),可以使用 LibreOffice 官方提供的 apt 源。
sudo apt install -y curl gnupg
sudo mkdir -p /etc/apt/keyrings
# 下载并导入 GPG 密钥
sudo curl -fsSL https://deb.libreoffice.org/key.gpg -o /etc/apt/keyrings/libreoffice.gpg
# 添加源(以 bookworm 为例)
echo "deb [signed-by=/etc/apt/keyrings/libreoffice.gpg] https://deb.libreoffice.org/dists/bookworm ./" | \
sudo tee /etc/apt/sources.list.d/libreoffice.list
sudo apt update
sudo apt install libreoffice
⚠️ 注意:
| 来源 | 版本 | 稳定性 | 适合人群 |
|---|---|---|---|
| Debian 官方源 | 较旧 | 高 | 普通用户、服务器 |
| LibreOffice 官方源 | 最新 | 中 | 需要新功能的用户 |
如果你是日常办公使用,用 Debian 自带源就足够了。
如果你愿意,我也可以帮你: