运行 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. TensorFlow 2 快速教程,初学者入门必备

    TensorFlow 2 简介 TensorFlow 是由谷歌在 2015 年 11 月发布的深度学习开源工具,我们可以用它来快速构建深度神经网络,并训练深度学习模型.运用 TensorFlow 及其 ...

  2. Linux操作系统的进程管理和作业管理

    Linux操作系统的进程管理和信号 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.lsof命令详解 1>.lsof概述 list open files查看当前系统文件的工 ...

  3. window安装gcc、g++、make等编译环境

    1. MinGW官网下载:http://www.mingw.org        点击右上角Downloads 点击下载 mingw-get-setup.exe 2. 百度网盘(2019年4月从官网下 ...

  4. KMP算法的时间复杂度与next数组分析

    一.什么是 KMP 算法 KMP 算法是一种改进的字符串匹配算法,用于判断一个字符串是否是另一个字符串的子串 二.KMP 算法的时间复杂度 O(m+n) 三.Next 数组 - KMP 算法的核心 K ...

  5. CentOS 7.5下KVM的安装与配置

    由于没有物理机可用,在自己的VMware Workstation中CentOS 7.5下搭建完成. 首先查看VMware Workstation是否支持虚拟化,把红框内打钩即可. 虚拟化开启并安装Ce ...

  6. hiveSQL常用日期函数

    注意 MM,DD,MO,TU 等要大写 Hive 可以在 where 条件中使用 case when 已知日期 要求日期 语句 结果 本周任意一天 本周一 select date_sub(next_d ...

  7. python 查询文件修改python lib 库文件

    运行code import os, time import sys import re def search(path, name): for root, dirs, files in os.walk ...

  8. 内部cms系统测试

    转载至51testing:http://www.51testing.com/html/34/n-4463534.html 内部系统的功能以及如何测试 前文有提到,我定义的内部系统,是一个由目前主流语言 ...

  9. h5自带的日期类型input

    在很多页面和web应用中都有输入日期和时间的地方,最典型的是订飞机票,火车票,酒店,批萨等网站. 在HTML5之前,对于这样的页面需求,最常见的方案是用Javascript日期选择组件.这几乎是无可争 ...

  10. S1_搭建分布式OpenStack集群_06 nova服务配置 (控制节点)

    一.创建数据库(控制节点)创建数据库以及用户:# mysql -uroot -p12345678MariaDB [(none)]> CREATE DATABASE nova_api;MariaD ...