在运行 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. 如何使用pandas分析金融数据

    [摘要]pandas是数据分析师分析数据最常用的三方库之一,结合matplotlib,非常强大. 首先我们收集一些数据. 从东方财富客户端导出券商信托板块2018年11月1日的基础行情和财务数据.分别 ...

  2. CF1009F Dominant Indices(启发式合并)

    You are given a rooted undirected tree consisting of nn vertices. Vertex 11 is the root. Let's denot ...

  3. HDU2255 奔小康赚小钱钱(二分图-最大带权匹配)

    传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子. 这可是一件大事,关系到人民的住房问题啊.村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子 ...

  4. UESTC-1964命运石之门(类似SPFA的BFS)

    命运石之门 Time Limit: 1000 MS     Memory Limit: 256 MB Submit Status "这一切都是命运石之门的选择!" 凶真博士发明了能 ...

  5. 如何妙用Spring 数据绑定机制?

    前言 在剖析完 「Spring Boot 统一数据格式是怎么实现的? 」文章之后,一直觉得有必要说明一下 Spring's Data Binding Mechanism 「Spring 数据绑定机制」 ...

  6. margin重叠与穿透问题

    margin重叠是指两个同级元素之间.margin穿透指的是,子元素margin超出父元素而未被父元素包含的现象. 出现margin重叠的原因: 同一个BFC里面两个块级元素会出现margin折叠. ...

  7. Python自动输入【新手必学】

    前言 本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理.作者:哈喽哈嘿哈 这篇文章是我的第一篇文章,写的不好的地方,请大家多多指教哈 ...

  8. Newman

    目录 简介 安装 使用 简介 Newman是为postman而生,专门用来运行postman编写好的脚本 使用Newman,你可以很方便的用命令行来执行postman collections Newm ...

  9. python学习-def

    # 函数# 实现了某一特定功能.# 可以重复使用. # len() 功能:获取长度.# input() 功能: 控制台输入# print() 功能:输出 # 语法 关键字def"" ...

  10. SOCKET CAN的理解

    转载请注明出处:http://blog.csdn.net/Righthek 谢谢! CAN总线原理 由于Socket CAN涉及到CAN总线协议.套接字.Linux网络设备驱动等.因此,为了能够全面地 ...