安裝流程
下載地址:
壓縮包下載下來后上傳至服務(wù)器進(jìn)行解壓縮
tar -zxvf LibreOffice_7.0.5_Linux_x86-64_rpm.tar.gz
進(jìn)入到RPMS目錄,進(jìn)行安裝
cd /LibreOffice_7.0.5.2_Linux_x86-64_rpm/RPMS
yum localinstall *.rpm
執(zhí)行命令使用
libreoffice7.0 --convert-to pdf filename ./
libreoffice7.0啟動命令
--convert-to pdf 內(nèi)容轉(zhuǎn)成PDF
filename 原始文件名稱
./ 輸出目錄 可自己定義
報錯處理
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
/opt/libreoffice7.0/program/soffice.bin: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory
解決方案
需要安裝依賴包
yum install cairo -y
yum install cups-libs -y
yum install libSM -y
編碼問題解決方案
yum groupinstall "fonts"
vim /etc/locale.conf
LANG=zh_CN.UTF-8
然后重啟服務(wù)器就可以解決亂碼問題