gpt4 book ai didi

linux-kernel - puppeteer 沙盒 : No usable sandbox

转载 作者:行者123 更新时间:2023-12-04 11:18:51 30 4
gpt4 key购买 nike

我安装了 Puppeteer 用于生成 pdf/minuatures,但我无法激活和配置 Chrome Linux Sandbox。总是相同的错误信息:

(node:46) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! [1208/055442.253403:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.



我按照官方文档中提到的步骤操作,但没有成功
# cd to the downloaded instance
cd <project-dir-path>/node_modules/puppeteer/.local-chromium/linux-<revision>/chrome-linux/
sudo chown root:root chrome_sandbox
sudo chmod 4755 chrome_sandbox
# copy sandbox executable to a shared location
sudo cp -p chrome_sandbox /usr/local/sbin/chrome-devel-sandbox
# export CHROME_DEVEL_SANDBOX env variable
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox

最佳答案

试试

sudo sysctl -w kernel.unprivileged_userns_clone=1

它将允许您作为非特权用户访问 Chromium 沙箱。
这是临时的,仅在重新启动之前处于事件状态。

关于linux-kernel - puppeteer 沙盒 : No usable sandbox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53681997/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com