美文网首页
CentOS 8 安装puppeteer 运行报错解决方式

CentOS 8 安装puppeteer 运行报错解决方式

作者: webmrxu | 来源:发表于2022-01-15 11:04 被阅读0次

    运行代码提示

    Error: Failed to launch the browser process!
    /www/wwwroot/vtopworld/server/node_modules/_puppeteer@13.0.1@puppeteer/.local-chromium/linux-938248/chrome-linux/chrome: error while loading shared。******* cannot open shared object file: No such file or directory。

    执行linux命令行

    sudo yum install -y chromium
    

    继续提示报错信息:
    Error: Failed to launch the browser process!
    [0115/105742.718414:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

    解决代码:

    puppetteer.launch({
       headless: true,
       args: ['--no-sandbox']
    })
    

    参考:

    Fixed: CentOS 8 ---- Error: Failed to launch the browser process!

    ERROR:zygote_host_impl_linux.cc(89) Running as root without --no-sandbox is not supported

    相关文章

      网友评论

          本文标题:CentOS 8 安装puppeteer 运行报错解决方式

          本文链接:https://www.haomeiwen.com/subject/ipsthrtx.html