office process. An error prevents us to start a process with"/>
Could not start the office process. An error prevents us to start a process with
问题重现
Could not start the office process.
org.jodconverter.core.office.OfficeException: An error prevents us to start a process with --accept ‘socket,host=127.0.0.1,port-2002,tcpNoDelay=1;urp;StarOffice.ServiceManager’
最近在使用 kkFileView 在线预览服务时,当部署在 linux(centos7)
上面时,启动kkFileView服务失败,报下面的这个错误,显然是这个文档转换服务启动失败。
解决
经过 google 大海捞针之后发现是因为缺少环境导致
实操
1、执行 kkfileview 项目中的自带默认安装服务脚本 install.sh 之后会在 /opt 下面产生一个libreoffice7.3 文件夹。
不同版本 libreoffice 版本号不同
[root@curry opt]# pwd
/opt
[root@curry opt]# ll
总用量 0
drwxr-xr-x. 7 root root 145 10月 30 02:58 libreoffice7.3
2、执行下面这个命令查看缺少的依赖(根据自己安装的版本替换/opt/libreofficeX.X)
[root@curry program]# /opt/libreoffice7.3/program/soffice --headless --accept="socket,host=127.0.0.1,port=2001;urp;" --nofirststartwizard &
3、经观察是由于缺少 libnss3.so
这个依赖导致的
4、安装依赖
[root@curry program]# yum install -y libnss3.so
5、停止kkfileview
[root@curry kkFileview]# sh shutdown.sh
正在停止进程:27197...
进程:27197停止成功!
6、启动kkfileview
[root@curry kkFileview]# sh startup.sh
Starting kkFileView...
Please execute tailf -n 300 log/kkFileview.log to check log for more information
7、成功启动
更多推荐
Could not start the office process. An error prevents us to start a process with
发布评论