优先使用此安装方法
1 | sudo chmod a+wt /tmp |
✅✅✅✅一次搞定,成功!✅✅✅✅
soffice默认安装地址
1 | ubuntu@ubuntu:/usr/local/bin$ pwd |
配置软连接
1 | sudo ln -s /opt/libreoffice24.8/program/soffice /usr/local/bin/libreoffice |
现在你可以直接运行:
1 | libreoffice --writer |
检测是否安装成功
1 | which libreoffice |
异常问题解决
/opt/libreoffice25.2/program/oosplash: error while loading shared libraries: libXinerama.so.1: cannot open shared object file: No such file or directory
你当前运行的 LibreOffice 报错的根本原因是系统缺少 libXinerama.so.1
这个共享库。
✅ 解决方法(适用于 Ubuntu / Debian 系统):
请直接运行以下命令安装缺失的依赖:
1 | sudo apt update |
安装完成后,再次执行:
1 | soffice --calc |
即可正常启动 LibreOffice 计算器模块。
🔍 补充说明:
libxinerama1
是 X11 的一个扩展库,用于支持多显示器环境。- 如果你之后还遇到类似错误(如
libcairo.so.2
、libXrender.so.1
等),可以继续用apt install 缺失库名
的方式解决。
✅ 总结:
报错内容 | 原因 | 解决命令 |
---|---|---|
libXinerama.so.1: cannot open shared object file |
缺少依赖库 | sudo apt install libxinerama1 |
异常问题解决
error while loading shared libraries: libssl3.so: cannot open shared object file: No such file or directory
1 | sudo apt update |
查找文件位置,并配置环境变量
1 | find / -name "libssl.so.3" |
创建软链接
1 | sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.3 /usr/lib/libssl.so.3 |
【!!&&】LibreOffice 安装引发的血案
1 | File \"/usr/local/lib/python3.9/site-packages/unstructured/partition/common.py\", line 160, in convert_office_doc\n |
Install instructions: https://www.libreoffice.org/get-help/install-howto/
Mac: https://formulae.brew.sh/cask/libreoffice
Debian: https://wiki.debian.org/LibreOffice\n在使用unstructured 包的时候 弹出 以下错误
fileNotFoundError(\nFileNotFoundError: soffice command was not found. Please install libreoffice\non your system and try
again.
他提示要安装LibreOffice
于是开始了 LibreOffice 的安装 以下链接是安装步骤 ,我选择了然后解压
Linux 下的安装方法 | LibreOffice 简体中文官方网站 - 自由免费的办公套件
解压 采用tar -zxvf /LibreOffice_7.5.4_Linux_x86-64_deb.tar.gz
报错 tar Not found in archive 然后查了查 解决方案
linux ‘tar: not found in archive‘错误处理_超萌养乐多的博客-CSDN博客
采用 了 ls *.tar.gz |xargs -n1 tar -zxvf指令
解压后安装 dpkg -i ./LibreOffice_7.5.4.2_Linux_x86-64_deb/DEBS/*.deb
但是在使用的时候出现了以下错误
1 | /opt/libreoffice7.5/program/oosplash: error while loading shared libraries: libXinerama.so.1: cannot open shared object |
然后去 查找问题 解决方法是安装 libXineramalinux - error while loading shared libraries: libXinerama.so.1: cannot open
shared object file: No such file or directory - Super User
于是开始安装 apt-get install libxinerama1
后面报 Err:5 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libx11-data all 2:1.6.9-2ubuntu1.2 404 Not
Found [IP: 91.189.91.39 80]
Err:6 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libx11-6 amd64 2:1.6.9-2ubuntu1.2 404 Not
Found [IP: 91.189.91.39 80]
于是又查找问题 说要更新
apt-get update
于是开始更新更新有报错GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: Couldn’t create temporary
file /tmp/apt.conf.HbA52m for passing config to apt-key
于是进行 apt clean ubuntu 16.04 An error occurred during the signature verification. The repository is not updated
and_Hardy-Lee的博客-CSDN博客
1 | sudo apt-get clean |
还是报错
An error occurred during the signature verification. The repository is not updated and the previous index files will be
used. GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: Couldn’t create temporary file /tmp/apt.conf.gmGfhQ
for passing config to apt-key
于是又去 找问题 W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: Couldn‘t create
temporary_WangJQ*的博客-CSDN博客
于是 给了 权限 chmod a+wt /tmp
apt-get update 可以更新了 apt-get install libxinerama1 也可以安装了
以为可以万事大吉之后
libreoffice7.5 -version
/opt/libreoffice7.5/program/soffice.bin: error while loading shared libraries: libssl3.so: cannot open shared object
file: No such file or directory
然后 找问题 安装了 apt-get install openssl
还是报错然后再安装
apt-get install libssl-dev
然后 沃日 搞不出来
最后我们回顾下 是安装 LibreOffice
这个网站然后
1 | sudo chmod a+wt /tmp |
成功了