sudo apt-get install libreoffice-common

如果出错可更新apt

sudo apt-get update
sudo apt-get upgrade

然后执行 soffice 看是否报错

javaldx: Could not find a Java Runtime Environment!
Please ensure that a JVM and the package libreoffice-java-common
is installed.
If it is already installed then try removing ~/.config/libreoffice/4/user/config/javasettings_Linux_*.xml
Warning: failed to read path from javaldx
Error: source file could not be loaded

如果是上述错误,可能是没有java环境,安装就好了

 apt install openjdk-8-jre-headless

我这里执行了一个python测试程序

仍然报错:Error: source file could not be loaded

这时候继续安装

sudo apt-get install libreoffice-writer

 欢迎关注wx公众号:python web小栈,共同探讨学习

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐