ubuntu 为什么安装脚本(PetaLinux)找不到zlib1g?

xxhby3vn  于 2023-02-21  发布在  Linux
关注(0)|答案(1)|浏览(501)

我试图在Ubuntu 20.04LTS上安装PetaLinux,从我目前所了解到的情况来看,脚本本身似乎不是我所面临的问题的(唯一)原因,所以我的问题必须从更广泛的意义上来理解。
要安装PetaLinux,您必须先安装一些其他的软件包:

sudo apt-get install libncurses5-dev libncursesw5-dev libtool net-tools autoconf xterm texinfo gcc-multilib gawk zlib1g libz1:i386 zlib1g-dev build-essential

当我现在尝试通过执行安装脚本来安装PetaLinux时,它显示了以下错误:

./petalinux-v2021.2-final-installer.run --dir /opt/PetaLinux
INFO: Checking installation environment requirements...
WARNING: This is not a supported OSdoes not Recognize zlib1g installation
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
ERROR: You are missing these development libraries required by PetaLinux: 

 - zlib1g:i386

Please install them with your operating system package manager, and try again
WARNING: Please install required packages.

 

Please refer to the PetaLinux Tools Installation Guide.
Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:

  /home/nico/Downloads/petalinux_installation_log

它说它找不到zlib1g:i386包,尽管我安装了zlib1gzlib1g-dev
问题是,我已经用相同的设置设置了一个虚拟机,安装了相同的包,安装程序运行得很好,成功地找到了zlib1g:i386。
我现在的问题是,什么样的故障或错误配置会导致安装脚本在我的机器上找不到所说的包?

以下是我目前尝试的方法

已尝试重新安装zlib1gzlib1g-dev

sudo apt-get --reinstall install zlib1g zlib1g-dev

此外,尝试显式安装:i386版本(无论如何,在虚拟机上不需要):

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install zlib1g:i386
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package zlib1g:i386 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 'zlib1g:i386' has no installation candidate

修复dpkg数据库

sudo dpkg --configure -a

希望你能给予我点建议去哪里看。

hof1towb

hof1towb1#

我刚刚安装了zlib1g:i386zlib1g-dev:i386,我使用的是Ubuntu 22.04.2 LTS。
您可以使用以下命令:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install zlib1g:i386 zlib1g-dev:i386

相关问题