运行 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

最新文章

  1. java基础1_标识符,数据类型
  2. ORACLE数据库的导入及导出
  3. OneThink学习笔记01
  4. serv-u and hway3.0
  5. 文件与目录的默认权限与隐藏权限【转vbird】
  6. 2016 icpc-camp 之旅(一)
  7. 【HTML】Intermediate7:Sectioning
  8. cocos2d-x学习日志(12) --弹出对话框的设计与实现
  9. poj 1068 Parencodings(栈)
  10. 2017最新最稳定的彩票源码PHP+mysql 新增彩种+全新界面
  11. JavaWeb基础-Jsp内置对象
  12. vue 路由参数
  13. 腾迅云获取免费SSL证书并布置
  14. webView 获取内容高度不准确的原因是因为你设置了某个属性
  15. Mac 系统下 mysql 的安装与配置
  16. Http协议的理解
  17. streaming简介
  18. LeetCode题解之Contains Duplicate II
  19. BAT for 循环
  20. ElasticSearch无法启动

热门文章

  1. Python入门篇-递归函数Recursion
  2. 介于JAVAswing和Socket写的聊天室
  3. C++ vector,list,deque区别(转)
  4. Stirling数入门
  5. web api 2.0 上传文件超过4M时,出现404错误
  6. jupyter Notebook 设置密码
  7. Postgresql operator does not exist: numeric = character varying
  8. php web开发——文件夹的上传和下载
  9. H5视频播放小结(video.js不好用!!!)
  10. mysql ERROR 1862 (HY000): 密码超时错误解决 Your password has expired.To log in you must change it using a client that supports expired password