lddコマンドで必要なライブラリを表示
lddコマンドを使うと、プログラムの実行に必要なライブラリを表示することができる
ldd /sample_jets_app/LambdaLayer/bin//chromedriver linux-vdso.so.1 (0x00007ffc1fb43000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f05b155e000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f05b153d000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f05b1533000) libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f05b1414000) libnss3.so => not found libnssutil3.so => not found libnspr4.so => not found libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f05b12d1000) libX11-xcb.so.1 => not found libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f05b12a7000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f05b1124000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f05b110a000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f05b0f47000) /lib64/ld-linux-x86-64.so.2 (0x00007f05b206a000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f05b0ed3000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f05b0ccf000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f05b0ac9000) libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f05b0aaf000)
なお、ライブラリのPATH追加はこう
$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64