puppeteer 在centos7 報 failed to launch chrome! 的問題

須要安裝的依賴

sudo yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 
alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc -y

而後更新 nss 庫
yum update nss -y
複製代碼

啓動的時候須要帶上

{
    headless: true,
    args: ['--no-sandbox', '--disable-setuid-sandbox']
}
複製代碼

node 版本 v8.11.1node

相關文章
相關標籤/搜索