缺少图书馆libx11.so.6 for OpenJDK:12-JDK Docker容器



我有一个来自 openjdk-12-jdk的dockerfile。在我的应用程序中

/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,但对于应用程序没有成功

我该如何获得这个库?还是oraclelinux不可能,这是openjdk-12-jdk Docker的基础?

====== edit =====

当我尝试启动Chromedriver进行硒测试时,我也试图称其为无头,但同样的错误出现

使用以下命令添加缺失的组件:

yum -y install libX11

最新更新