首页 > 解决方案 > heroku/rails/chrome/selenium:加载共享库时出错:libxshmfence.so.1

问题描述

在 Heroku 上的 RoR 上使用 Selenium 和 Chrome 运行 Capybara。直到昨天我更新到 Chrome v88 时,一切都运行良好。

我收到以下错误:

/app/.apt/opt/google/chrome/chrome: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory

Heroku stack 20. 到目前为止还没有找到有类似问题的人。

如何判断是否是 chrome 问题?chromedriver 问题?一个heroku问题?任何帮助是极大的赞赏

标签: ruby-on-railsgoogle-chromeherokuselenium-chromedriver

解决方案


从 chrome buildpack 页面:

https://github.com/heroku/heroku-buildpack-google-chrome/issues/105

1 添加构建包:

“https://github.com/heroku/heroku-buildpack-apt”

2 在应用程序的根目录添加一个名为 Aptfile 的文件

3 在文件中粘贴 libxshmfence-dev


推荐阅读