在运行 pyppeteer 的时候,因为依赖浏览器,出现上述情况。

解决办法:

一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误。原因一般有两个, 一个是操作系统里确实没有包含该共享库(lib*.so.*文件)或者共享库版本不对, 遇到这种情况那就去网上下载并安装上即可.

解决 Pyppeteer在docker中的依赖:

1. 更新并安装:

apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils

2. 做好字体库安装或者映射,否则容易出现,页面字体小方块的情况

ln -s 字体库文件 /usr/share/fonts/custom

参考:https://www.cnblogs.com/Anker/p/3209876.html

参考:https://github.com/macacajs/macaca-puppeteer-docker/blob/master/Dockerfile

docker chromium/chrome: error while loading shared libraries: libXcursor.so.2: cannot open shared object file: No such file or directory的更多相关文章

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

    运行 puppeteer 报错 chrome: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open sh ...

  2. error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

    zabbix3.2启动有如下报错: # service zabbix_server startStarting zabbix_server:  /home/zabbix-server/sbin/zab ...

  3. 错误解决:error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

    执行以下代码,生成唯一的UID $fp = popen("/xxx/bin/tools/uuidgen system", "r");// $uid = frea ...

  4. error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file or directory .

    转载:http://www.eefocus.com/pengwr/blog/2012-02/235057_baf52.html 此时你可以locate libXXX.so.x 一下,查看系统里是否有该 ...

  5. Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir

    问题: Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared obje ...

  6. svnadmin:error while loading shared libraries: libaprutil-1.so.0:cannot open shared object file: No such file or directory

    wdcp下安装svn后一直提示 svnadmin:error while loading shared libraries: libaprutil-1.so.0:cannot open shared ...

  7. 动态链接库找不到 : error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory

    问题: 运行gsl(GNU scientific Library)的函数库,用 gcc erf.c -I/usr/local/include -L/usr/local/lib64 -L/usr/loc ...

  8. ./filezilla: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

    opensuse系统 在filezilla官网下载压缩文件解压运行后报 ./filezilla: error while loading shared libraries: libpng12.so.0 ...

  9. error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file

    安装rac10g,出现例如以下错误: [root@rac2 oracle]# /u01/product/crs/root.sh WARNING: directory '/u01/product' is ...

随机推荐

  1. windows系统tomcat上开发的j2ee程序,如何适配linux系统上奔跑的websphere7

    公司需要将几个windows系统tomcat中间件下开发的j2ee系统部署到linux系统websphere7中间件下去运行. 这就需要做系统的适配工作.由于时间比较久了,具体问题就不详细写了.把这个 ...

  2. Flask开发VIP版HttpServer #华为云·寻找黑马程序员#

    欢迎添加华为云小助手微信(微信号:HWCloud002 或 HWCloud003),输入关键字"加群",加入华为云线上技术讨论群:输入关键字"最新活动",获取华 ...

  3. NumPy 学习 第三篇:矢量化和广播

    矢量化 矢量化是指用数组表达式替换显式的for循环.在Python中循环数组或其他跟数组类似的数据结构时,使用循环会涉及很多开销.NumPy中的矢量化操作把内部循环委托给高度优化的C和Fortran函 ...

  4. png兼容IE6的方法

    1.通过CSS滤镜使背景图的PNG对IE6进行兼容 定义一个样式,给某个div应用这个样式后,div的透明png背景图片自动透明了. <style> body{background: li ...

  5. Docker Compose集成式应用组合及service编排

    Compose简介 Compose项目是Docker官方的开源项目,负责实现对Docker容器集群的快速编排.其代码目前在 https://github.com/docker/compose 开源.C ...

  6. 2018HDU多校训练一 K - Time Zone

    Chiaki often participates in international competitive programming contests. The time zone becomes a ...

  7. 【JS】328- 8个你不知道的DOM功能

    最近一直在关注工具,从 React 和 npm-install-everything 中休息一下,看看一些原生的 DOM 和 Web API 的功能,他们可以在没有任何依赖库的浏览器中直接运行. 这篇 ...

  8. 大数据学习笔记——Hive完整部署流程

    Hive详细部署教程 此篇博客承接上篇Hadoop和Zookeeper的部署教程,将会详细地对HIve的部署做一个整理,Hive相当于是封装在HDFS和Mapreduce上的一套sql引擎,只需要安装 ...

  9. Linux配置开机自启动的两种方法

    一.通过rc.local该文件实现开机自启   1:编写测试脚本 [root@host1 ~]# vim test.sh #!/bin/bash /bin/echo $(/bin/date +%F_% ...

  10. Vue如何实现数据响应的

    参考博客:https://medium.com/vue-mastery/the-best-explanation-of-javascript-reactivity-fea6112dd80d 翻译博客: ...