Centos7安装libreoffice
安裝Centos7之后,系統(tǒng)安裝了libreoffice 3.x版本。現(xiàn)在想安裝 6.x版本。
在自己的電腦上親自實驗安裝成功,下面是每一步操作的紀錄
卸載系統(tǒng)當前的libreoffice
執(zhí)行如下命令:
yum remove libreoffice-*
1
為了能使用鏡像,在etc 目錄之下的hosts文件內(nèi)加入代理。
注意沒有加的話,可能第三步無法操作.可不加。
.208.46.146 www.google.com
.208.46.146 dl.google.com
.208.46.146 dl-ssl.google.com
1
2
3
獲取rpm文件
http://mirrors.ustc.edu.cn/tdf/libreoffice/stable
1
選擇6.0.3 (可能發(fā)布最新版時候就是5.05,目前我使用的是6.0.3)
然后選擇rpm然后選擇x86_64
http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.0.3/rpm/x86_64/
1
下載3個文件
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
1
2
3
ceontos直接復制代碼就行
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
1
2
3
解壓文件,執(zhí)行如下命令
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/
1
2
3
4
進入到的RPMS目錄
上面兩個文件解壓之后,/usr/libreoffice/下面會有3個文件夾,里面都有一個RPMS文件夾
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
進入到LibreOffice_6.0.3_Linux_x86-64_rpm的rpm ,執(zhí)行入下命令
cd /usr/libreoffice/LibreOffice_6.0.3_Linux_x86-64_rpm/RPMS
1
用yum來進行rpm的安裝,不要用rpm命令來進行安裝
yum localinstall *.rpm
【注意:
因為有 依賴關系 libgnomevfs-2.so.0()(64bit),它被軟件包 libobasis5.0-gnome-integration-6.0.3-2.x86_64 需要,所以不要使用rpm命令來進行安裝, rpm -ivh *.rpm 命令無法解決上面的依賴系。使用yum遇到上面的依賴關系的時候可以從網(wǎng)絡下載相應的包來解決依賴關系。】
到此為止office成功安裝了.
安裝完成之后,打開office還是會報錯,提示找不到libcairo,
[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
1
2
3
4
安裝 yum -y install cairo
即可
如果出現(xiàn)如下提示:
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
1
2
3
4
5
下載安裝如下 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
1
2
或者安裝
yum -y install libSM
也行
其他的一些需要安裝的軟件
yum install ibus 安裝第三方依賴工具
yum install libreoffice-headless 該工具用來啟動Libreoffice
但是我們安裝默認是英文版的,所以進行漢化.
這個時候使用這個
LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
1
進入到LibreOffice_6.0.3_Linux_x86-64_rpm_langpack_zh-CN 文件夾,然后
執(zhí)行如下命令
yum localinstall *.rpm
打開office之后發(fā)現(xiàn)漢化了哦
關于LibreOffice介紹一下:
LibreOffice 能夠與 Microsoft Office 系列以及其它開源辦公軟件深度兼容,且支持的文檔格式相當全面
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、網(wǎng)頁:*.html, *.htm, *.stw
6、主控文檔:*.sxg
7、公式:*.odf, *.sxm, *.smf, *.mml
8、數(shù)據(jù)庫文檔:*. odb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
總的來說,LibreOffice的界面沒有微軟Office那么華麗,但非常簡單實用。它的六大組件對應Office絲毫不差,而且對系統(tǒng)配置要求較低,占用資源很少。
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
1
2
3
4
https://www.cnblogs.com/dongguolei/p/7902552.html
yum install libreoffice-headless
作者:diyiday
來源:CSDN
原文:https://blog.csdn.net/diyiday/article/details/79852923
版權聲明:本文為博主原創(chuàng)文章,轉載請附上博文鏈接!
總結
以上是生活随笔為你收集整理的Centos7安装libreoffice的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 什么是赋范线性空间、内积空间,度量空间,
- 下一篇: Educational Codeforc