天天看点

ImportError: libGL.so.1: cannot open shared object file: No such file or directory缺少共享库

ImportError: libGL.so.1: cannot open shared object file: No such file or directory缺少共享库

原因:缺少共享库

解决方法:

1. centos:

(1)yum install mesa-libGL.x86_64,测试可用

(2)查到的方法,没有测试过

ImportError: libGL.so.1: cannot open shared object file: No such file or directory缺少共享库

2. Ubuntu:

sudo apt update

sudo apt install libgl1-mesa-glx

可能容器内没有sudo指令

可以

apt-get update

apt-get install sudo

引用

[1]: https://www.ohazyi.com/docker-docs/

[2]: https://github.com/conda-forge/pygridgen-feedstock/issues/10