centos 安装puppeteer 遇到的一些错误

centos 安装puppeteer 遇到的一些错误

月光魔力鸭

2022-06-07 00:43 阅读 4678 喜欢 5

libatk-1.0.so.0

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决:yum install atk

libatk-bridge-2.0.so.0

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libatk-bridge-2.0.so.0: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决: yum install at-spi2-atk

libcups.so.2

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决: yum install cups-libs

libxkbcommon.so.0

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libxkbcommon.so.0: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决:yum install libxkbcommon-x11-devel

libXcomposite.so.1

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决:yum install libXcomposite

libXdamage.so.1

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libXdamage.so.1: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决: yum install libXdamage.x86_64

libXrandr.so.2

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libXrandr.so.2: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决: yum install libXrandr.x86_64

libgbm.so.1

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决:yum install mesa-libgbm

libpango-1.0.so.0

Failed to launch the browser process! /data/project/p_base/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libpango-1.0.so.0: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决:yum install pango

no-sandbox

Failed to launch the browser process! [0607/001807.992620:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

解决:在启动参数中增加 --no-sandbox

安装字体

yum groupinstall "fonts" -y

转载请注明出处: https://chrunlee.cn/article/puppeteer-centos-error-so.html


感谢支持!

赞赏支持
提交评论
评论信息 (请文明评论)
暂无评论,快来快来写想法...
推荐
关于js的编译和压缩,之前做过一个小工具了,主要就是自己项目成员大都没有这部分的技能,导致发布的时候总需要去编译压缩下.. 最终做了个命令行小工具.. 问题不在这里,前一阵子做压缩的时候发现压缩后竟然是undefined.最终才发现是es6的语法问题。
今天写文章,突然发现自己常用的素材站换成了webp格式的图片.. 可惜本站还没准备加这个支持,所以准备加个webp转jpg的小功能,继续使用啦。
尝试下使用nodejs下开源图像识别库来识别图像状态。
当我们做爬虫或其他的一些应用的时候,如果需要一些短信验证,但是又没有那么多手机号,又不能放人在那里一直输入的时候?怎么办?
为什么要读取图片呢?需求来源于这里。我有一大堆的ppt文件,里面全是图片,想将这些图片全部拿到,然后存储在数据库中,在线上预览,一张张的保存我自然是不乐意的。
在我们做运维或者小工具的时候,总会有些需要提醒的事情,比如服务器宕机或者天气提醒,但是发email又会不够及时或者可能会忽略,那么短信就是一个不错的选择了
最近在折腾的时候又想写less了,但是换框架了,成了thinkjs,考虑到开发阶段一直编译编译less的情况..最终根据middleware的特点实现了一个超级简单的less中间件。
今天想在服务器上跑下自己自动签到的程序,需要安装puppeteer ,结果出错。 permission denied, mkdir '/root/.nvm/versions/node/v9.11.1/lib/node_modules/