
インストール用のdockerfileを作成しようとしています。スピックAlpine Linuxの基本イメージ。
手順はファイルの作成/etc/ld.so.conf.d/nwrfcsdk.conf
と配置を示しています。これにより、ldconfigはsaprfcライブラリをロードする必要があります。/usr/local/sap/nwrfcsdk/lib
nwrfcsdk.conf
しかし、Alpineのldconfigはld.so.conf.d
。ldconfig -p
それでは、Alpine Linuxでカスタムライブラリ検索パスを追加する方法は?
答え1
これは私にとって効果的です。私のJavaでは、setcapが機能するために追加のライブラリパスが必要です。
echo "/lib:/usr/local/lib:/usr/lib:/usr/lib/jvm/default-jvm/jre/lib/amd64:/usr/lib/jvm/default-jvm/jre/lib/amd64/jli:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server" > /etc/ld-musl-x86_64.path
~からイスラム教徒のハンドブック:
../etc/ld-musl-$(ARCH).path, taken relative to the location of
the "program interpreter" specified in the program's headers -
if present, this will be processed as a text file containing
the shared library search path, with components delimited by
newlines or colons. If absent, a default path of
"/lib:/usr/local/lib:/usr/lib" will be used.
Not used by static-linked programs.
ld が使用する正確なパスは、アーチによって異なる場合があります。次のようにして私のパスを見つけました。
# strace java ... 2>&1 | grep ld
open("/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)