1 更新apt-get
sudo apt-get update
2 安装jdk
查看jdk安装情况
Command 'java' not found, but can be installed with:
sudo apt install default-jre # version 2:1.11-72, or
sudo apt install openjdk-11-jre-headless # version 11.0.13+8-0ubuntu1~20.04
sudo apt install openjdk-13-jre-headless # version 13.0.7+5-0ubuntu1~20.04
sudo apt install openjdk-16-jre-headless # version 16.0.1+9-1~20.04
sudo apt install openjdk-17-jre-headless # version 17.0.1+12-1~20.04
sudo apt install openjdk-8-jre-headless # version 8u312-b07-0ubuntu1~20.04
显示没有安装
## 安装
sudo apt-get install openjdk-8-jdk
3 安装 libreoffice
sudo apt install libreoffice
doc转docx
soffice --headless --invisible --convert-to docx apply-template.doc
需要被转的doc文件路径 : apply-template.doc
成了!