温馨提示×

centos旧版能装liboffice吗

小樊
44
2026-09-27 12:29:11
栏目: 智能运维

可以的,CentOS 旧版本也能安装 LibreOffice,但有一些注意事项,取决于你所说的“旧版”具体是哪一个(比如 CentOS 6 / 7 / 8 还是更早)。

下面分情况说明:


一、CentOS 7(仍较常用)

✅ 推荐方式:直接用官方 RPM 包

  1. 到 LibreOffice 官网下载对应版本的 RPM 包
    https://www.libreoffice.org/download/download-libreoffice/

  2. 解压并安装:

tar -xzf LibreOffice_*.tar.gz
cd LibreOffice_*/RPMS
sudo yum install *.rpm
  1. 依赖通常 CentOS 7 自带,若缺依赖:
sudo yum groupinstall "X Window System"

二、CentOS 6(已 EOL,但可装)

⚠️ 能用,但新版 LibreOffice 不支持

  • LibreOffice 6.x 及以后基本放弃 CentOS 6
  • 建议安装 LibreOffice 5.x 或更早版本
  • 下载旧版: https://downloadarchive.documentfoundation.org/libreoffice/old/

示例:

wget https://downloadarchive.documentfoundation.org/libreoffice/old/5.4.7.2/rpm/x86_64/LibreOffice_5.4.7.2_Linux_x86-64_rpm.tar.gz

安装方式同上。


三、CentOS 8(已停止维护)

✅ 可装,但需注意仓库问题

  • CentOS 8 官方源已停
  • 可用 LibreOffice 官方 RPM 或迁移到 Rocky / AlmaLinux
  • 依赖可能需启用 PowerTools:
dnf config-manager --set-enabled powertools

四、通过 EPEL 安装(不推荐最新版)

yum install epel-release
yum install libreoffice

⚠️ 版本通常较老,但稳定


五、常见问题

  • 无图形界面?
    可装 headless 版本用于转换文档:

    libreoffice --headless --convert-to pdf file.docx
    
  • 中文显示乱码?
    安装中文字体:

    yum install wqy-zenhei-fonts
    

如果你能告诉我:

  • CentOS 具体版本(6 / 7 / 8)
  • 是否带桌面环境
  • 用途(日常办公 / 服务器转文档)

我可以给你最合适的安装方案。

0 踩