• CentOS 7 安装LibreOffice 7.4.0 过程


    CentOS 7 安装LibreOffice 7.4.0 过程

    参考了多个网上的LibreOffice安装教程,或多或少都有点过时了,所以我重新整理CentOS7安装LibreOffice7.4的过程,把安装过程中遇到的问题也进行了梳理。

    1、检查当前操作系统环境是否已经安装了LibreOffice。

    libreoffice --version
    
    • 1

    如果已经安装,需要把自带的LibreOffice卸载

    yum remove libreoffice-*
    
    • 1

    2、进入LibreOffice官网下载rpm安装包,访问地址:

    https://zh-cn.libreoffice.org/download/libreoffice/

    3、解压并安装LibreOffice。

    tar -zxvf ./LibreOffice_7.4.0_Linux_x86-64_rpm.tar.gz
    cd LibreOffice_7.4.0.3_Linux_x86-64_rpm/RPMS/
    yum -y localinstall *.rpm
    
    • 1
    • 2
    • 3

    4、安装libreoffice-headless

    yum install -y libreoffice-headless
    
    • 1

    5、验证LibreOffice是否可用

    libreoffice7.4 --version
    
    • 1

    如果命令可以正常执行显示版本号的话,说明安装成功;若提示缺少so文件的话,需要安装对应的依赖文件。

    6、安装依赖库文件

    • yum install cairo -y
    • yum install cups-libs -y
    • yum install libSM -y

    在这些依赖库文件之中,“libcurl.so.4”库文件的安装过程比较复杂,需要编译安装libcurl才能完成。

    7、安装libcurl.so.4库文件

    (1)下载安装openssl源代码,https://github.com/openssl/openssl/archive/OpenSSL_1_1_1g.zip

    (2)创建安装目录:/opt/openssl

    (3)解压所代码压缩包。

    unzip openssl-OpenSSL_1_1_1g.zip
    
    • 1

    (4)编译配置、安装。

    cd openssl-OpenSSL_1_1_1g/
    ./config --prefix=/opt/openssl --shared
    make && make install
    
    • 1
    • 2
    • 3

    (5)下载curl源代码,curl - Download

    (6)创建安装目录:/opt/libcurl

    (7)解压源代码压缩包。

    tar -zxvf curl-7.85.0.tar.gz
    
    • 1

    (8)编译配置、安装。

    cd curl-7.85.0
    ./configure --prefix=/opt/libcurl --with-ssl=/opt/openssl
    make && make install
    
    • 1
    • 2
    • 3

    (9)将libcurl.so.4库文件拷贝至/opt/libreoffice7.4/program目录下,覆盖原libcurl.so.4文件。

    ln -s /opt/libcurl/lib/libcurl.so.4 /opt/libreoffice7.4/program/libcurl.so.4
    
    • 1

    (10)设置命令别名。

    alias libreoffice='libreoffice7.4'
    
    • 1
  • 相关阅读:
    AIGC专栏7——EasyPhoto 人像训练与生成原理详解
    基于springboot+vue的游戏交流论坛系统 elementui
    JavaWeb_LeadNews_Day10-Xxljob, Redis实现定时热文章
    Android音视频开发-AudioTrack
    Mysql(库操作)
    JUC第十七讲:JUC集合: ConcurrentLinkedQueue详解
    W3C发布WebAssembly 2.0首个草案
    数据库基础小练习
    ArduinoIDE快速搭建ESP32开发环境
    嘉为蓝鲸CMP云管平台入选Gartner《中国云管理工具市场指南》
  • 原文地址:https://blog.csdn.net/an129/article/details/126766228