问题
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:
- Add Aptfile with
- libsm6
- libxrender1
- libfontconfig1
- libice6
- Add buildpack https://github.com/heroku/heroku-buildpack-apt
- 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