如何解决Puppeteer:启动浏览器进程失败

时间:2021-03-25 07:59:40

标签: puppeteer

使用命令安装Puppeteer:npm install puppeteer 操作系统:CentOs7 3.10.0-693.11.6.el7.x86_64 当我尝试运行该文件时,出现以下错误

(node:14216) UnhandledPromiseRejectionWarning:错误:无法启动浏览器进程! /opt/xyz/node-v14.16.0-linux-x64/lib/node_modules/npm/node_modules/puppeteer/.local-chromium/linux-856583/chrome-linux/chrome:加载共享库时出错:libxkbcommon.so。 0:无法打开共享对象文件:没有那个文件或目录

如何解决这个错误?

1 个答案:

答案 0 :(得分:0)

它说明了缺少什么:

blpConnect()

您的系统上需要有该库。似乎 this 是其中之一,您可以使用包管理器安装它:

error while loading shared libraries: libxkbcommon.so.0