centos 安装puppeteer 遇到的一些错误

centos 安装puppeteer 遇到的一些错误

月光魔力鸭

2022-06-07 00:43 阅读 4569 喜欢 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


感谢支持!

赞赏支持
提交评论
评论信息 (请文明评论)
暂无评论,快来快来写想法...
推荐
对于开发来说,看到别人家的小程序都这么靓,这么顺畅,这么好用,用户又多... 自然是眼馋的..用户馋不来,可以先馋他的身子..啊不,代码啊。
通过pm2来实现nodejs应用的集群,不过我之前没做session共享,导致.. 登录不上啊 啊啊啊,无奈,又重新对redis进行了集成。
学习爬虫的时候突然有想到想做一个音乐播放小站,可以给自己或朋友听,但是音乐哪里来呢??想到自己常听的豆瓣FM,就越发的想把这些音乐都拿下来,因此有了下文通过豆瓣FM批量抓取上万首音乐,目前已经3W+。
通过nodejs来进行爬取页面的内容,这里简单试试做个小任务..
今天想在服务器上跑下自己自动签到的程序,需要安装puppeteer ,结果出错。 permission denied, mkdir '/root/.nvm/versions/node/v9.11.1/lib/node_modules/
介绍几个日常开发中常用的几个小工具: anywhere / anywhere-auth / watchlessc / changeext
最近又回归了下DNF ,玩了一段时间,感觉也挺没意思的,关键是平时更没意思,想着不行搞个自动刷图吧(先说结论,没成)
我们项目一直在使用puppeteer 生成pdf ,整体的思路是没有问题的,而且在开发环境运行了好久了,但是部署后总会有各种各样的报错。各种so文件找不到等等 。