cd libreoffice/
# 下载 libreoffice 安装包
wget https://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/7.3.1/rpm/x86_64/LibreOffice_7.3.1_Linux_x86-64_rpm.tar.gz
wget https://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/7.3.1/rpm/x86_64/LibreOffice_7.3.1_Linux_x86-64_rpm_sdk.tar.gz
wget https://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/7.3.1/rpm/x86_64/LibreOffice_7.3.1_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
# 解压安装包
tar -zxvf LibreOffice_7.3.1_Linux_x86-64_rpm.tar.gz
tar -zxvf LibreOffice_7.3.1_Linux_x86-64_rpm_sdk.tar.gz
tar -zxvf LibreOffice_7.3.1_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
# 安装命令
yum localinstall LibreOffice_7.3.1.3_Linux_x86-64_rpm/RPMS/*.rpm
yum localinstall LibreOffice_7.3.1.3_Linux_x86-64_rpm_sdk/RPMS/*.rpm
yum localinstall LibreOffice_7.3.1.3_Linux_x86-64_rpm_langpack_zh-CN/RPMS/*.rpm
# 在末尾追加
export JAVA_HOME=/usr/local/java/jdk1.8.0_291
export JRE_HOME=/usr/local/java/jdk1.8.0_291/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
# 使配置文件生效
source /etc/profile
# 查看是否成功
java -version
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
# 重新执行 soffice --version
soffice --version
# 如果还是出现其他错误 可能需要Google一下或者百度一下了。
libreoffice 对 word 转换
soffice --invisible --convert-to pdf xxx.docx;
# word 转换成 epub
soffice --invisible --convert-to epub xxx.docx;
# word 转换成 html
soffice --invisible --convert-to "html:XHTML Writer File:UTF8" xxx.docx;
# word 转换成 txt
soffice --invisible --convert-to "txt:Text (encoded):UTF8" xxx.docx;
出现字体乱码问题请下载字体解决
centos
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!