[root@centos7 rams2]# riscv64-unknown-linux-gnu-objdump -x usr/sbin/tcpdump | grep NEEDED NEEDED libcrypto.so.1.1 NEEDED libpcap.so.0.8 NEEDED libc.so.6 NEEDED ld-linux-riscv64-lp64d.so.1
# tcpdump -h tcpdump: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/libcrypto.so.1.1) tcpdump: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/libdbus-1.so.3) tcpdump: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /usr/lib/libsystemd.so.0) tcpdump: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/libsystemd.so.0) tcpdump: /lib64/libc.so.6: version `GLIBC_2.30' not found (required by /usr/lib/libsystemd.so.0) tcpdump: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /usr/lib/liblzma.so.5) tcpdump: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/libcap.so.2) tcpdump: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/libgcrypt.so.20) #
原来libc.so.6有问题
[root@centos7 rams2]# strings lib64/libc.so.6 | grep GLIBC GLIBC_2.27 GLIBC_2.28 GLIBC_PRIVATE [root@centos7 rams2]#
用这个版本的替换
root@ubuntu:/home/ubuntu/data2# strings ./usr/lib/riscv64-linux-gnu/libc.so.6 | grep GLIBC GLIBC_2.27 GLIBC_2.28 GLIBC_2.29 GLIBC_2.30 GLIBC_2.32 GLIBC_2.33 GLIBC_PRIVATE GNU C Library (Ubuntu GLIBC 2.33-0ubuntu5) release release version 2.33.
./configure --prefix=/usr/local/tcpdump --host=riscv CC=riscv64-unknown-linux-gnu-gcc --with-system-libpcap=../usr/lib/libpcap.so.1.10.0