64位ubuntu下运行32位程序

1. 运行环境

虚拟机:virtualbox 5.2.16

linux系统:ubuntu 18.04 64位

2. 编译报错

bash: ./cjpeg: No such file or directory

3. 解决办法

在terminal 依次输入如下命令:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
sudo apt-get install lib32ncurses5 ​
sudo apt-get install lib32z1

或者:

 sudo apt-get update

sudo apt-get purge libc6-dev

sudo apt-get install libc6-dev

sudo apt-get install libc6-dev-i386

参考:https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit

 

你可能感兴趣的:(Linux)