64位linux上支持运行32位程序的方法

来源:互联网 发布:淘宝里什么是旺旺号 编辑:程序博客网 时间:2024/06/01 08:32

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

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

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

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


2.解决方法

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"

0 0
原创粉丝点击