我有一个Dockerfile,它来自
所以我在Dockerfile中添加了
但错误仍然存在,并且与上述相同的错误导致失败。
因此,我尝试在容器内直接使用
我该如何获得这个库?或者在
===== 编辑内容 ====
当我尝试启动selenium测试的chromedriver时,我也尝试以headless方式调用它,但仍然出现相同的错误。
openjdk-12-jdk
。在我的应用程序中,一个依赖项 (https://github.com/bonigarcia/webdrivermanager) 显然需要libX11.so.6库,因为应用程序启动失败,显示如下错误信息:
/usr/src/app/etc/chromedriver/linux64/75.0.3770.8/chromdriver: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
我尝试了yum whatprovides libX11.so.6
,得到了以下返回结果:
bash-4.2# yum whatprovides libX11.so.6
Loaded plugins: ovl
libX11-1.6.5-1.el7.i686 : Core X11 protocol client library
Repo : ol7_latest
Matched from:
Provides : libX11.so.6
libX11-1.6.5-2.el7.i686 : Core X11 protocol client library
Repo : ol7_latest
Matched from:
Provides : libX11.so.6
libX11-1.6.5-1.el7.i686 : Core X11 protocol client library
Repo : @ol7_latest
Matched from:
Provides : libX11.so.6
所以我在Dockerfile中添加了
RUN yum -y install libX11-1.6.5-1.el7.i686
。但错误仍然存在,并且与上述相同的错误导致失败。
因此,我尝试在容器内直接使用
yum install libX11.i686
,但是对于该应用程序仍然没有成功。我该如何获得这个库?或者在
openjdk-12-jdk
docker基础上进行的oraclelinux
中不可能吗?===== 编辑内容 ====
当我尝试启动selenium测试的chromedriver时,我也尝试以headless方式调用它,但仍然出现相同的错误。
openjdk-12-jdk
切换到 centos,并手动安装了 openjdk。 我安装了 Google Chrome 并在无头模式下启动了我的测试。这是我的解决方法,但并不是实际问题的答案。 - Emerson Cod