2개의 시스템에서 vim을 시작했는데 하나는 작동하고 다른 하나는 정의되지 않은 기호로 인해 실패합니다. 문제는 한 시스템에서는 libogg가 로드되지 않았지만 시스템에서는 아무런 차이가 없다는 것입니다.
작업 시스템:
0 root@cpcsrv ~ #
ldd -d -r /usr/bin/vim
linux-vdso.so.1 (0x00007ffeac3bb000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9fd78c0000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f9fd7890000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f9fd7865000)
libcanberra.so.0 => /usr/lib/x86_64-linux-gnu/libcanberra.so.0 (0x00007f9fd7852000)
libacl.so.1 => /usr/lib/x86_64-linux-gnu/libacl.so.1 (0x00007f9fd7847000)
libgpm.so.2 => /usr/lib/x86_64-linux-gnu/libgpm.so.2 (0x00007f9fd7641000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9fd7639000)
libpython3.8.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007f9fd70e3000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9fd70c0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9fd6ece000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9fd7cf7000)
libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f9fd6e3e000)
libvorbisfile.so.3 => /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f9fd6e33000)
libtdb.so.1 => /usr/lib/x86_64-linux-gnu/libtdb.so.1 (0x00007f9fd6e17000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f9fd6e0c000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9fd6dde000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9fd6dc2000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f9fd6dbd000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f9fd6d8d000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f9fd6d80000)
0 root@cpcsrv ~ #
shasum /usr/bin/vim
252456f6ae369b50b19080fded66a8c30cd276cb /usr/bin/vim
0 root@cpcsrv ~ #
ldd /usr/bin/vim | cut -d ">" -f2 | cut -d"(" -f1 | xargs shasum
shasum: linux-vdso.so.1: No such file or directory
ecde9cbea868f4245458ac312c4e41e3e5cd0be3 /lib/x86_64-linux-gnu/libm.so.6
db05aa3c95a397af27269d42ab64a89072e6e399 /lib/x86_64-linux-gnu/libtinfo.so.6
186d209e1d331e9160d6d0b03c523d862ae9d2a4 /lib/x86_64-linux-gnu/libselinux.so.1
1157a413eeca7e8f6f3092d98af78aecd678e135 /usr/lib/x86_64-linux-gnu/libcanberra.so.0
87824e3a1281f42cb17ec488486b9ef416b61f0c /usr/lib/x86_64-linux-gnu/libacl.so.1
d50fcf01f7db835832c1b4dae33cf4477bdf1de6 /usr/lib/x86_64-linux-gnu/libgpm.so.2
5be25973b0e59032cf8ac8ae16355aff6a3eb894 /lib/x86_64-linux-gnu/libdl.so.2
2f724c975ec8c9dd192ed077d950fcd30b1613d4 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0
36c05642b16160a42e3eba7eb299b3d5dfbafdfe /lib/x86_64-linux-gnu/libpthread.so.0
a1ca4cd2d1df2fcd2c0f582665051c261d84c1d6 /lib/x86_64-linux-gnu/libc.so.6
12b731d805f0c26f91ffd950669c213d5e809904 /lib64/ld-linux-x86-64.so.2
edb19c4b3bf4defa1f6a806e577a6fc8e9ac20b8 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
2667a466d02c008e9110d1e0f9846e857fb8bec5 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3
dce449732ea95a5b952bc0b2ac91eae82dca3045 /usr/lib/x86_64-linux-gnu/libtdb.so.1
cf4f107a7ccdeefbcaace4d70bb61a4e75eb3231 /usr/lib/x86_64-linux-gnu/libltdl.so.7
e35093b682cbed186b459917d7c9e704bbeb7f65 /lib/x86_64-linux-gnu/libexpat.so.1
1c5fcbe97e9b9f4e366360b955679029540b7b2a /lib/x86_64-linux-gnu/libz.so.1
1cbd68bb04c11c31209da67d7afdb3b1b1d49d2b /lib/x86_64-linux-gnu/libutil.so.1
50bea70a1a350d8261b603f307872d116f272782 /usr/lib/x86_64-linux-gnu/libvorbis.so.0
18c43955cb21b4c034825be32d7d59f72ab8ed17 /usr/lib/x86_64-linux-gnu/libogg.so.0
123 root@cpcsrv ~ #
shasum /lib64/ld-linux-x86-64.so.2
12b731d805f0c26f91ffd950669c213d5e809904 /lib64/ld-linux-x86-64.so.2
손상된 시스템:
1 root@cscc-login-1 ~ #
vim
vim: symbol lookup error: /usr/lib/x86_64-linux-gnu/libvorbis.so.0: undefined symbol: oggpack_readinit
127 root@cscc-login-1 ~ #
ldd -d -r /usr/bin/vim
linux-vdso.so.1 (0x00007ffc527e1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc2be965000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fc2be935000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fc2be90a000)
libcanberra.so.0 => /usr/lib/x86_64-linux-gnu/libcanberra.so.0 (0x00007fc2be8f7000)
libacl.so.1 => /usr/lib/x86_64-linux-gnu/libacl.so.1 (0x00007fc2be8ec000)
libgpm.so.2 => /usr/lib/x86_64-linux-gnu/libgpm.so.2 (0x00007fc2be6e6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc2be6de000)
libpython3.8.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007fc2be188000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc2be165000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2bdf73000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc2bed96000)
libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fc2bdee3000)
libvorbisfile.so.3 => /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007fc2bded8000)
libtdb.so.1 => /usr/lib/x86_64-linux-gnu/libtdb.so.1 (0x00007fc2bdebc000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fc2bdeb1000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fc2bde83000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc2bde67000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fc2bde62000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fc2bde32000)
undefined symbol: oggpack_readinit (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_bytes (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_adv (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_writeclear (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_get_buffer (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_reset (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_read (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_writetrunc (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_writeinit (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_write (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: oggpack_look (/usr/lib/x86_64-linux-gnu/libvorbis.so.0)
undefined symbol: ogg_stream_reset (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_packetpeek (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_clear (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_bos (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_clear (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_packetout (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_pagein (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_reset (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_buffer (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_wrote (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_granulepos (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_pageseek (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_init (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_stream_reset_serialno (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_serialno (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_continued (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_sync_init (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
undefined symbol: ogg_page_eos (/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3)
0 root@cscc-login-1 ~ #
shasum /usr/bin/vim
252456f6ae369b50b19080fded66a8c30cd276cb /usr/bin/vim
0 root@cscc-login-1 ~ #
ldd /usr/bin/vim | cut -d ">" -f2 | cut -d"(" -f1 | xargs shasum
shasum: linux-vdso.so.1: No such file or directory
ecde9cbea868f4245458ac312c4e41e3e5cd0be3 /lib/x86_64-linux-gnu/libm.so.6
db05aa3c95a397af27269d42ab64a89072e6e399 /lib/x86_64-linux-gnu/libtinfo.so.6
186d209e1d331e9160d6d0b03c523d862ae9d2a4 /lib/x86_64-linux-gnu/libselinux.so.1
1157a413eeca7e8f6f3092d98af78aecd678e135 /usr/lib/x86_64-linux-gnu/libcanberra.so.0
87824e3a1281f42cb17ec488486b9ef416b61f0c /usr/lib/x86_64-linux-gnu/libacl.so.1
d50fcf01f7db835832c1b4dae33cf4477bdf1de6 /usr/lib/x86_64-linux-gnu/libgpm.so.2
5be25973b0e59032cf8ac8ae16355aff6a3eb894 /lib/x86_64-linux-gnu/libdl.so.2
2f724c975ec8c9dd192ed077d950fcd30b1613d4 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0
36c05642b16160a42e3eba7eb299b3d5dfbafdfe /lib/x86_64-linux-gnu/libpthread.so.0
a1ca4cd2d1df2fcd2c0f582665051c261d84c1d6 /lib/x86_64-linux-gnu/libc.so.6
12b731d805f0c26f91ffd950669c213d5e809904 /lib64/ld-linux-x86-64.so.2
edb19c4b3bf4defa1f6a806e577a6fc8e9ac20b8 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
2667a466d02c008e9110d1e0f9846e857fb8bec5 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3
dce449732ea95a5b952bc0b2ac91eae82dca3045 /usr/lib/x86_64-linux-gnu/libtdb.so.1
cf4f107a7ccdeefbcaace4d70bb61a4e75eb3231 /usr/lib/x86_64-linux-gnu/libltdl.so.7
e35093b682cbed186b459917d7c9e704bbeb7f65 /lib/x86_64-linux-gnu/libexpat.so.1
1c5fcbe97e9b9f4e366360b955679029540b7b2a /lib/x86_64-linux-gnu/libz.so.1
1cbd68bb04c11c31209da67d7afdb3b1b1d49d2b /lib/x86_64-linux-gnu/libutil.so.1
50bea70a1a350d8261b603f307872d116f272782 /usr/lib/x86_64-linux-gnu/libvorbis.so.0
123 root@cscc-login-1 ~ #
shasum /lib64/ld-linux-x86-64.so.2
12b731d805f0c26f91ffd950669c213d5e809904 /lib64/ld-linux-x86-64.so.2
0 root@cscc-login-1 ~ #
ldd /usr/lib/x86_64-linux-gnu/libvorbis.so.0
linux-vdso.so.1 (0x00007ffd3eb85000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc4f446b000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fc4f445e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc4f426c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc4f45f5000)
127 root@cscc-login-1 ~ #
sha1sum /usr/lib/x86_64-linux-gnu/libogg.so.0
18c43955cb21b4c034825be32d7d59f72ab8ed17 /usr/lib/x86_64-linux-gnu/libogg.so.0
내가 무엇을 놓치고 있나요?
참고: libvorbis의 ldd는 vim을 통해 간접적으로 로드되는 경우에만 정의되지 않은 기호를 표시하지 않습니다.
고쳐 쓰다:
저는 LD_DEBUG=all vim
두 개의 시스템에서 실행 중입니다. 작동 중인 시스템에서는 다음과 같은 결과(및 기타 여러 결과)를 얻습니다.
790086: file=libogg.so.0 [0]; needed by /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 [0]
790086: find library=libogg.so.0 [0]; searching
790086: search cache=/etc/ld.so.cache
790086: trying file=/usr/lib/x86_64-linux-gnu/libogg.so.0
790086:
790086: file=libogg.so.0 [0]; generating link map
790086: dynamic: 0x00007fe8529cacc8 base: 0x00007fe8529bf000 size: 0x000000000000c010
790086: entry: 0x00007fe8529c1480 phdr: 0x00007fe8529bf040 phnum: 11
손상된 시스템에는 첫 번째 블록도 있지만 "링크 맵 생성" 블록이 누락되고 libogg가 출력에서 사라집니다.