【问题标题】:Puppeteer on Linux Azure Web AppsLinux Azure Web 应用程序上的 Puppeteer
【发布时间】:2020-09-14 10:31:35
【问题描述】:

我正在尝试在 Linux Azure Web 应用程序上运行 Puppeteer。但是日志显示

/node_modules/puppeteer/.local-chromium/linux-782078/chrome-linux/chrome: 加载共享库时出错:libgobject-2.0.so.0:无法打开 共享对象文件:没有这样的文件或目录

我认为这是由于 Azure 上的 Linux 发行版。我的问题是:这是死胡同还是我能做些什么?

【问题讨论】:

    标签: azure azure-web-app-service puppeteer azure-linux


    【解决方案1】:

    看起来应用服务中的默认环境没有运行无头 Chromium 所需的依赖项。但是,您可以在安装了依赖项的自定义 Docker 映像中的应用服务上运行您的应用程序。这是一个很好的起点:https://github.com/buildkite/docker-puppeteer

    【讨论】:

    • 我遇到了这个问题 - 我正在使用 buildkite/puppeteer 基础映像在 docker 映像中运行我的 puppeteer。有什么想法可以让它发挥作用吗?
    • 如果您在运行 puppeteer 时遇到任何问题,请查看troubleshooting documentation。对于这个答案,请咨询Running Puppeteer in Docker
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-12
    相关资源
    最近更新 更多