LibreOffice - LibreOffice报错集合
前言
提示:以下是本篇文章正文内容,下面案例可供参考
背景
从官网下载了LibreOffice包,解压后执行./install . /tools/opensrc/libreoffice/7.2.1.2
,启动发生报错,请往下看。
问题描述
报错 LibreOffice user installation could not be processed due to missing access rights.
如果是7.1.2或者6.3版本,则可能是下图报错(下图摘自互联网)
问题分析
这个是LibreOffice因为默认的Profile在安装目录下,假设安装目录受管理员管理,普通User无权限写,启动则会报这个错误。(使用strace跟踪分析,可发现需要安装目录的写权限。)
解决方法
解决方法一
针对报错,用户启动时指定Profile目录到其它目录,即可解决问题。
用户启动命令:
soffice -env:UserInstallation=file:///tmp/$USER/libreoffice-version
假设是工具管理员,在LibreOffice 的modulefile中插入一行,设置alias:
set-alias soffice "soffice -env:UserInstallation\=file:///tmp/$env(USER)/libreoffice-version"
设置别名的方法有两个缺点,就是
- 多个启动命令需要单独设置,未设置的就使用不了;
- 换到其它shell后需要重新设置别名,无法继承。
解决方法二
查看启动配置文件
[thesre@icinfra ~]$ cat /tools/opensrc/libreoffice/7.2.1.2/opt/libreoffice7.2/program/bootstraprc
[Bootstrap]
InstallMode=<installmode>
ProductKey=LibreOffice 7.2
UserInstallation=$BRAND_BASE_DIR/../UserInstallation
可以由工具管理员,修改该配置文件的UserInstallation项,到用户有权限修改的文件夹下(注:$SYSUSERCONFIG这个变量,参考资料,一般是解析为~/.config
目录),
[thesre@icinfra ~]$ cat /tools/opensrc/libreoffice/7.2.1.2/opt/libreoffice7.2/program/bootstraprc
[Bootstrap]
InstallMode=<installmode>
ProductKey=LibreOffice 7.2
UserInstallation=$SYSUSERCONFIG/libreoffice/4
这个方法是一劳永逸的方法,推荐使用。
总结
提示:这里对文章进行总结。
参考资料
https://blog.csdn.net/thesre/article/details/120469382
https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
https://bz.apache.org/ooo/show_bug.cgi?id=121914