【Linux系列】64位linux上支持运行32位程序的方法

DATE: 2020.6.11


转载自:https://blog.csdn.net/qq_33438733/article/details/79672774

一、在64位的Linux上运行32位程序的时候会出现这种情况:

(1)执行bin文件时提示:No such file or directory

(2)ldd bin文件 的输出为: not a dynamic executable

(3)file bin文件 的输出显示程序是32位

二、解决方法

debian上只要安装 ia32-libs这个包(apt-get install ia32-libs)就可以了。

$ sudo apt-get install ia32-libs

无法安装,找不到库,就用下面这个方法,

打开多架构支持,然后更新

$ sudo dpkg –add-architecture i386

$ sudo apt-get update

$ sudo apt-get install ia32-libs

如果没有ia32-libs就用

$ sudo dpkg –add-architecture i386

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install lib32ncurses5 lib32z1

或者

安装pwntools的过程中如果出错的话用这句话

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

安装peda

git clone https://github.com/longld/peda.git ~/peda

echo “source ~/peda/peda.py” >> ~/.gdbinit

echo “DONE! debug your program with gdb and enjoy”

你可能感兴趣的:(【Linux/Gcc技术专栏】,Linux,64,32)