【问题标题】:installing puppeteer 2 elastickbeanstalk安装 puppeteer 2 弹性豆茎
【发布时间】:2020-07-09 06:16:14
【问题描述】:

我无法在 aws AWS Elastic Beanstalk 上部署 puppeteer

我收到以下错误:

无法启动浏览器进程!\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /lib64/libdbus-1.so.3: 否可用的版本信息(/usr/lib64/libatk-bridge-2.0.so.0 需要)\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome:/ lib64/libdbus-1.so.3:没有可用的版本信息(/usr/lib64/libatspi.so.0 需要)\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/ chrome-linux/chrome:符号查找错误:/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome:未定义符号:g_type_class_adjust_private_offset\n\n\n故障排除:https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md\n"

有人遇到过同样的问题并设法解决了吗?

【问题讨论】:

    标签: node.js linux amazon-elastic-beanstalk puppeteer


    【解决方案1】:

    需要添加多个共享库,见https://github.com/puppeteer/puppeteer/issues/765#issuecomment-358111805 你还需要'sudo yum install -y mesa-libgbm.x86_64' 看起来它只适用于 puppeteer2.0.0,更高版本失败,https://github.com/puppeteer/puppeteer/issues/5379

    【讨论】:

      【解决方案2】:

      最后我用这个解决了:

      packages:
        yum:
          compat-libtiff3: []
      
      commands:
        chrome:
          command: curl https://intoli.com/install-google-chrome.sh | bash
      

      【讨论】:

      • 这对我不起作用并发送错误:Failed to launch the browser process!\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-809590/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1
      【解决方案3】:

      这对我有用!

      在 elastic beanstalk 中通过 SSH 远程连接

      eb ssh {environment_name}

      安装谷歌浏览器

      curl https://intoli.com/install-google-chrome.sh | bash

      来源: https://dev.to/achimoraites/a-developers-guide-to-run-puppeteer-on-elastic-beanstalk-no-ubuntu-linux-4pl5

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-05-01
        • 1970-01-01
        • 2018-06-18
        • 2015-03-20
        • 2016-01-04
        • 2016-08-19
        • 2018-02-25
        • 2019-11-06
        相关资源
        最近更新 更多