Linux爬坑大全
1. 执行一个存在的二进制文件后报错:Bash: No such file or directory
【问题定位】
参考链接:linux - Bash: No such file or directory? - Stack Overflow
# readelf --all ./bin/mysql_install_db |grep interpreter
[Requesting program interpreter: /lib/ld-linux.so.2]
# ll |grep ld-linux.so.2
解析: 依赖的库文件不存在,find了一下,貌似是在升级过程中这些链接以及库文件对应的都被放置到了/snap/core18/…和/snap/core20/…中
【解决办法】
# dpkg --add-architecture i386
# apt update
# apt install libc6:i386
# ll |grep ld-linux.so.2
lrwxrwxrwx 1 root root 25 Dec 16 2020 ld-linux.so.2 -> i386-linux-gnu/ld-2.31.so*