After installing Centos7, the system installed libreoffice 3.x version. Now want to install version 6.x.
Experiment and install successfully on your own computer. The following is the record of each step.
Uninstall the system's current libreoffice
Execute the following command:
yum remove libreoffice-*
To be able to use the mirror, add the proxy to the hosts file under the etc directory.
Note that if you do not add it, the third step may not be able to operate. You can not add it.
.208.46.146 www.google.com
.208.46.146 dl.google.com
.208.46.146 dl-ssl.google.com
get rpm file
http://mirrors.ustc.edu.cn/tdf/libreoffice/stable
Select 6.0.3 (maybe 5.05 when the latest version is released, currently I am using 6.0.3)
then select rpm and then select x86_64
http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/rpm/x86_64/
Download 3 files
LibreOffice_6.0.3_Linux_x86-64_rpm.tar.gz
LibreOffice_6.0.3_Linux_x86-64_rpm_sdk.tar.gz
LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
ceontos just copy the code directly
wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/rpm/x86_64/LibreOffice_6.0.3_Linux_x86-64_rpm.tar.gz
wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/rpm/x86_64/LibreOffice_6.0.3_Linux_x86-64_rpm_sdk.tar.gz
wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/rpm/x86_64/LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
Unzip the file and execute the following command
mkdir /usr/libreoffice
tar -zxvf LibreOffice_6.0.3_Linux_x86-64_rpm.tar.gz -C /usr/libreoffice/
tar -zxvf LibreOffice_6.0.3_Linux_x86-64_rpm_sdk.tar.gz -C /usr/libreoffice/
tar -zxvf LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz -C /usr/libreoffice/
Go to the RPMS directory
After the above two files are decompressed, there will be 3 folders under /usr/libreoffice/, and there will be an RPMS folder inside.
LibreOffice_6.0.3_Linux_x86-64_rpm
LibreOffice_6.0.3_Linux_x86-64_rpm_sdk
LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN
Enter the rpm of LibreOffice_6.0.3_Linux_x86-64_rpm and execute the following command
cd /usr/libreoffice/LibreOffice_6.0.3_Linux_x86-64_rpm/RPMS
Use yum to install rpm, do not use rpm command to install
yum localinstall *.rpm
[Note:
Because there is a dependency libgnomevfs-2.so.0()(64bit), it is required by the package libobasis5.0-gnome-integration-6.0.3-2.x86_64, so do not use the rpm command to install, The rpm -ivh *.rpm command cannot resolve the above dependencies. When using yum to encounter the above dependencies, you can download the corresponding packages from the network to resolve the dependencies. 】
So far Office has been successfully installed.
After the installation is complete, opening office will still report an error, indicating that libcairo cannot be found.
[root@localhost uploads]# libreoffice6.0 --invisible --convert-to html test.doc
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
/opt/libreoffice6.0/program/soffice.bin: error while loading shared libraries: libcairo.so.2: cannot open shared object file: No such file or directory
Install yum -y install
cairo
If the following prompt appears:
libreoffice6.0 d9755f55-6722-4e74-a7c7-b74f4ac09ec0.docx
Failed to open display
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
/opt/libreoffice6.0/program/soffice.bin: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory
Download and install the following libSM-1.2.2-2:
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libSM-1.2.2-2.el7.i686.rpm
yum -y localinstall libSM-1.2.2-2.el7.i686.rpm
Or install yum -y
install libSM
Other software that needs to be installed
yum install ibus installs a third-party dependency tool
yum install libreoffice-headless This tool is used to start Libreoffice
But our installation is in English by default, so it is Chinese.
this time use this
LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
Go to the LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN folder, then
Execute the following command
yum localinstall *.rpm
After opening office, I found that it was Chinese.
A little bit about LibreOffice:
LibreOffice is deeply compatible with the Microsoft Office family and other open source office software, and supports a comprehensive range of document formats
1、文本文档:*.odm, *.sgl, *.odt,*.ott, *.sxw, *.stw, *.fodt, *.xml, *.docx,*.docm, *.dotx, *.dotm, *.doc, *.dot, *.wps, *.pdb, *.hwp, *.html, *.htm, *.lwp, *.psw, *.rft, *.sdw, *.vor, *.txt, *.wpd ,*.oth.
2、电子表格:*.ods, *.ots, *.sxc, *.stc, *.fods, *.xml, *.xlsx, *.xlsm, *.xltm, *.xltx, *.xlsb, *.xls, *.xlc, *.xlm, *.xlw, *.xlk, *.sdc, *.vor, *.dif,*.wk1, *.wks, *.123, *.pxl, *.wb2, *.csv.
3、演示文稿:*.odp, *.otp, *.sti, *.sxd, *.fodp, *.xml, *.pptx, *.pptm, *.ppsx, *.potm, *.potx, *.ppt, *.pps, *.pot, *.sdd, *.vor, *.sdp.
4、绘图:*.odg, *.otg, *.sxd, *.std, *.sgv,*.sda, *.vor, *.sdd, *.cdr, *.svg, *.vsd, *.vst
5、网页:*.html, *.htm, *.stw
6、主控文档:*.sxg
7、公式:*.odf, *.sxm, *.smf, *.mml
8、数据库文档:*. odb
Overall, the interface of LibreOffice is not as flashy as Microsoft Office, but it is very simple and functional. Its six major components correspond exactly to Office, and it requires less system configuration and takes up very few resources.
libreoffice6.0 完成格式转换
libreoffice6.0 --invisible --convert-to pdf:writer_pdf_Export --outdir "/root/" "bb.xls"
把test.doc转换成html,保存在test目录
libreoffice6.0 --invisible --convert-to html --outdir ./test test.doc
https://www.cnblogs.com/dongguolei/p/7902552.html
yum install libreoffice-headless
Attach the installation method under ubutnu
ubuntu installed software
wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/deb/x86_64/LibreOffice_6.0.3_Linux_x86-64_deb.tar.gz
wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/deb/x86_64/LibreOffice_6.0.3_Linux_x86-64_deb_sdk.tar.gz
http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/deb/x86_64/LibreOffice_6.0.3_Linux_x86-64_deb_langpack_zh-CN.tar.gz
tar -zxvf LibreOffice_6.0.3_Linux_x86-64_deb.tar.gz -C /usr/libreoffice/
tar -zxvf LibreOffice_6.0.3_Linux_x86-64_deb_sdk.tar.gz -C /usr/libreoffice/
tar -zxvf LibreOffice_6.0.3_Linux_x86-64_deb_langpack_zh-CN.tar.gz -C /usr/libreoffice/
之后进入文件夹,运行如下安装命令即可
sudo dpkg -i *.deb
报错:
安装
wget http://kr.archive.ubuntu.com/ubuntu/pool/main/libx/libxinerama/libxinerama1_1.1.3-1_amd64.deb
sudo dpkg -i libxinerama1_1.1.3-1_amd64.deb
wget http://ftp.cn.debian.org/debian/pool/main/c/cairo/libcairo2_1.15.10-1_amd64.deb
sudo dpkg -i libcairo2_1.15.10-1_amd64.deb
安装libcairo2_1.15.10-1_amd64.deb会出现有些so文件需要升级,然后就需要升级所需的依赖包
wget http://ftp.cn.debian.org/debian/pool/main/f/fontconfig/libfontconfig1_2.12.6-0.1_amd64.deb
sudo dpkg -i libxinerama1_1.1.3-1_amd64.deb
以下提示说明有些包的版本过低,需要升级即可,
Selecting previously unselected package libcairo2:amd64.
(Reading database ... 123249 files and directories currently installed.)
Preparing to unpack libcairo2_1.15.10-1_amd64.deb ...
Unpacking libcairo2:amd64 (1.15.10-1) ...
Preparing to unpack libxinerama1_1.1.3-1_amd64.deb ...
Unpacking libxinerama1:amd64 (2:1.1.3-1) over (2:1.1.3-1) ...
dpkg: dependency problems prevent configuration of libcairo2:amd64:
libcairo2:amd64 depends on libfontconfig1 (>= 2.12); however:
Version of libfontconfig1:amd64 on system is 2.11.94-0ubuntu1.1.
libcairo2:amd64 depends on libfreetype6 (>= 2.7.1); however:
Version of libfreetype6:amd64 on system is 2.6.1-0.1ubuntu2.3.
dpkg: error processing package libcairo2:amd64 (--install):
dependency problems - leaving unconfigured
Setting up libxinerama1:amd64 (2:1.1.3-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
libcairo2:amd64