如何在 12.04 LTS(32 位)上安装 ia32-libs

如何在 12.04 LTS(32 位)上安装 ia32-libs

我正在尝试在 Ubuntu 12.04 LTS (x86) 上安装ia32-libs。我启用了所有存储库源,但收到以下错误消息:

~$ sudo apt-get install ia32-libs  
Reading package lists... Done  
Building dependency tree         
Reading state information... Done  
Package ia32-libs is not available, but is referred to by another package.  
This may mean that the package is missing, has been obsoleted, or  
is only available from another source  

E: Package 'ia32-libs' has no installation candidate

sudo apt-cache policy ia32-libs 的输出

ia32-libs:  
  Installed: (none)  
  Candidate: (none)  
  Version table:  

cat /etc/apt/sources.list 的输出 (删除了类似的超链接)

deb http://archive.ubuntu.com/ubuntu/ precise restricted main multiverse universe  
deb-src archive.ubuntu.com/ubuntu/ precise restricted main multiverse universe #Added by software-properties  
deb security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse  
deb-src security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse #Added by software-properties  
deb archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse  
deb-src archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse #Added by software-properties

答案1

仅在 64 位版本的 Ubuntu 上运行某些 32 位应用程序时才需要该软件包。在 32 位/i386 架构上,所有内容(应用程序、库等)都是 32 位。

既然您不是为了这样做而尝试安装该软件包,那么您尝试安装什么软件以及使用什么指南或如何使用?

答案2

你可以通过删除系统包缓存来修复这个问题

rm -f /var/lib/apt/lists/* 
apt-get clean all
apt-get update

答案3

要在 64 位机器上安装 32 位进程,您需要添加新的架构,然后添加一些库

dpkg --print-foreign-architectures  #  show non native arch if any
sudo dpkg --add-architecture i386   #  add the 32 bit arch
sudo apt-get -qqy update
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386

这在 16.04 到 17.04 上都可以正常工作

相关内容