BookStack不能导出pdf-Running as root without --no-sandbox is not supported

安装完BookStack后,尝试着导出电子文档,发现除了PDF文档导出不了,EPUB文档和MOBI文档导出都很正常。

查看日志信息报错如下:

1
ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180

原来是chromium 不支持以 root 用户身份运行,除非使用 --no-sandbox 参数

因此需要编辑配置文件/etc/supervisor/conf.d/bookstack.conf,添加QTWEBENGINE_DISABLE_SANDBOX=1这个参数,

完整配置如下:

1
2
3
4
5
6
7
8
9
[program:BookStack]
directory = /opt/BookStack
command =/opt/BookStack/BookStack
autostart = true
autorestart=true
user = root
redirect_stderr = true
stdout_logfile = /var/log/supervisor/BookStack.log
environment=QTWEBENGINE_DISABLE_SANDBOX=1

配置完成后,重启服务

1
supervisorctl reload