ImportError: libGL.so.1 : error when accessing Heroku app

与世无争的帅哥 提交于 2021-02-09 07:39:19

问题


I have a probem with accessing my heroku app because of following error

2020-09-11T10:25:09.492648+00:00 app[web.1]: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

What i already tried is:

  1. Add Aptfile with
  • libsm6
  • libxrender1
  • libfontconfig1
  • libice6
  1. Add buildpack https://github.com/heroku/heroku-buildpack-apt
  2. use opencv-python-headless in requirements

nothing works.

Does anyone know what the problem is?


回答1:


Add 'libgl1' to Aptfile.

I guess generally the fixes work like this:

If you have library errors like libGL.so.1 you should take the name of the library in lowercase (in this case 'libgl'), add the number at the end (in this case it's '1') so you get libgl1 and write it in Aptfile.




回答2:


First run

heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt

Create Aptfile and add libgl1



来源:https://stackoverflow.com/questions/63845382/importerror-libgl-so-1-error-when-accessing-heroku-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!