可以的,不过需要先澄清两个小点:
编辑源文件(需要 root 权限):
sudo nano /etc/apt/sources.list
例如换成清华源(Debian 12 bookworm):
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free
保存后执行:
sudo apt update
sudo apt install libreoffice
如果只想装基础办公组件(更小):
sudo apt install libreoffice-writer libreoffice-calc libreoffice-impress
main 仓库已启用,并执行了 apt updatebookworm-backports 或去 LibreOffice 官网下载 .debsudo apt install libreoffice --no-install-recommends
如果你告诉我 Debian 版本(如 11/12) 和 是不是桌面环境,我可以给你更精确的源和安装命令。