加载共享库 libstdc++.so.6 时出错:没有这样的文件或目录(需要)

Error loading shared library libstdc++.so.6: No such file or directory (needed by)

我在尝试将 jprofiler 附加到容器内的 zulu jvm 时看到以下错误。

错误:

Error loading shared library libstdc++.so.6: No such file or directory (needed by

传递的 JVM 参数:

-agentpath:/data/jprofiler11.0.2/bin/linux-x86/libjprofilerti.so=port=8849,nowait

显然,使用的容器映像没有所需的库。我在库中使用了不同的图像并使其工作。

我知道export *.so到LD_LIBRARY_PATH,然后程序可以找到它。

export LD_LIBRARY_PATH=path1:path2

但我想知道不使用LD_LIBRARY_PATH,如何找到*.so

我试着写成 -agentpath:a.so:b.so=opt1=x,opt2=y,但是不行