运行 puppeteer 报错 chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory

[root@eus_aps_crawler01:/data/www/vhosts/aps_task/httpdocs]# node test.js
(node:5490) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
/data/www/vhosts/aps_task/httpdocs/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

at onClose (/data/www/vhosts/aps_task/httpdocs/node_modules/puppeteer/lib/Launcher.js:348:14)
    at Interface.helper.addEventListener (/data/www/vhosts/aps_task/httpdocs/node_modules/puppeteer/lib/Launcher.js:337:50)
    at Interface.emit (events.js:203:15)
    at Interface.close (readline.js:397:8)
    at Socket.onend (readline.js:173:10)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:5490) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5490) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

# 分析:pango版本太高,需要降到低版本
解决办法:
[root@eus_aps_crawler01:~]# rpm -qa|grep pango
pango-1.42.4-4.el7_7.x86_64
[root@eus_aps_crawler01:~]# rpm -e --nodeps pango-1.42.4-4.el7_7.x86_64
# 下载 pango-1.40.4安装
# wget https://buildlogs.centos.org/c7.1708.00/pango/20170805142921/1.40.4-1.el7.x86_64/pango-1.40.4-1.el7.x86_64.rpm
[root@eus_aps_crawler01:~]# yum localinstall pango-1.40.4-1.el7.x86_64.rpm

运行 puppeteer 报错 chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory的更多相关文章

  1. 报错libtest: error while loading shared libraries: libuv.so.1: cannot open shared object file: No such file or directory

    使用g++编译.运行libuv的demo错误解决 我们通过例子来讲述监视器的使用. 例子中空转监视器回调函数被不断地重复调用,  通过例子我们也可以了解到: 由于设置了监视器, 所以调用 uv_run ...

  2. 新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo

    新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo ...

  3. puppeteer报错 UnhandledPromiseRejectionWarning: Error: Protocol error (Page.getLayoutMetrics): Target closed.

    puppeteer运行时报错: UnhandledPromiseRejectionWarning: Error: Protocol error (Page.getLayoutMetrics): Tar ...

  4. 在MyEclipse中运行tomcat报错 严重: Error starting static Resources

    严重: Error starting static Resourcesjava.lang.IllegalArgumentException: Document base E:\apache-tomca ...

  5. 运行yum报错:Error: Cannot retrieve metalink for repository: epel. Please verify its path

    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again 当我们安装第三方扩 ...

  6. 解决ffmpeg执行报错“ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory”的问题

    问题现象: 执行ffmpeg命令后报错: ffmpeg: error : cannot open shared object file: No such file or directory 出问题的环 ...

  7. linux下报错:error while loading shared libraries

    linux执行bin程序报: error while loading shared libraries:libncurses.so.5: cannot open shared object file: ...

  8. 安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types'

    报错如下图所示: 解决方法:删除目录“C:\Users\wls\AppData\Roaming\npm\node_modules”下的npm文件夹

  9. iOS真机运行 Xcode报错(libpng error: CgBI: unhandled critical chunk)问题已解决;

    Cocos2d-x加载图片资源出现libpng error: CgBI: unhandled critical chunk Xcode7.3 设置Remove Text Metadata From P ...

随机推荐

  1. QuickStart系列:Docker部署PostgreSQL

    docker镜像地址: https://hub.docker.com/_/postgres/ https://www.widuu.com/chinese_docker/examples/postgre ...

  2. CI框架扩展系统类库

    CI框架不支持像yii2框架那样,可以直接在controllers下创建CommonController并继承父类,那么我们想要做登录控制或权限控制时,直接在父类控制器操作是不合理的. 这时比较方便的 ...

  3. python中str和byte的相互转化

    在涉及到网络传输的时候,数据需要从str转换成btye才能进行传输. python byte 转 str , str 转 byte 其实很简单:原理图如下:在这里插入图片描述案例: a: str = ...

  4. 如何更改Scratch3.0的LOGO

    1.用visual studio code打开文件夹scratch-gui-develop 找到SRC\components\menu-bar 方法1:制作图片更换掉图片scratch-logo.sv ...

  5. 卓越Code第一次作业

    第一次团队作业 序言 所属课程 https://edu.cnblogs.com/campus/xnsy/2019autumnsystemanalysisanddesign 作业要求 https://w ...

  6. SQL进阶系列之3三值逻辑与NULL

    写在前面 普通编程语言里的布尔型只有true和false两个值,这种逻辑体系被称为二值逻辑,而SQL语言里,还有第三个值unknown,因此SQL的逻辑体系被称为三值逻辑. Why SQL存在三值逻辑 ...

  7. scrapy框架爬取智联招聘网站上深圳地区python岗位信息。

    爬取字段,公司名称,职位名称,公司详情的链接,薪资待遇,要求的工作经验年限 1,items中定义爬取字段 import scrapy class ZhilianzhaopinItem(scrapy.I ...

  8. linux用户的问题

    最近在开发的时候遇到一个问题: 我在某个项目下的某个文件夹内写了一个可以单独run的A.py文件,这个文件里面的代码可以调用kubernetes的python接口来请求kubernetes上的信息(比 ...

  9. 06-Flutter移动电商实战-dio基础_Get_Post请求和动态组件协作

    上篇文章中,我们只看到了 dio 的使用方式,但并未跟应用关联起来,所以这一篇将 dio 网络请求与应用界面结合起来,当然这也是为以后的实战作基础准备,基础打牢,我们才能飞速前进. 1.案例说明 我们 ...

  10. [学习笔记] Miller-Rabin 质数测试

    Miller-Rabin 事先声明,因为菜鸡Hastin知识水平有限就是菜,因此语言可能不是特别规范,仅供理解. step 0 问一个数\(p\)是否为质数,\(p<=10^{18}\). 一个 ...