为什么安装脚本(PetaLinux)找不到zlib1g?
我正在尝试在 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
包,即使我安装了 zlib1g
和 zlib1g-dev
。
问题是,我已经设置了一个具有相同设置的虚拟机,安装了相同的软件包,安装程序运行得很好,并成功找到了 zlib1g:i386。
我现在的问题是,什么样的故障或配置错误可能导致安装脚本在我的计算机上找不到所述包?
这是我迄今为止尝试过的:
尝试重新安装zlib1g
和zlib1g-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
希望你能给我一些关于在哪里查看的指示。
I am trying to install PetaLinux on Ubuntu 20.04LTS.
From what I've figured out so far, the script itself seems not to be the (only) cause of the problems I am facing, so my questions has to be understood in a broader sense.
To install PetaLinux, you have to previously install some other packages:
sudo apt-get install libncurses5-dev libncursesw5-dev libtool net-tools autoconf xterm texinfo gcc-multilib gawk zlib1g libz1:i386 zlib1g-dev build-essential
When I now try to install PetaLinux by executing the installation script, it shows me the following error:
./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
It says it couldn't find the zlib1g:i386
package, even though I installed zlib1g
and zlib1g-dev
.
The thing is, I've set up a virtual machine with the same setup, installed the same packages and the installer runs just fine and successfully finds zlib1g:i386.
My question now is, what kind failure or misconfiguration could lead to the installation script not finding said package on my machine?
Here is what I've tried so far:
Tried to reinstall zlib1g
and zlib1g-dev
sudo apt-get --reinstall install zlib1g zlib1g-dev
Additionally tried to explicitly install the :i386 version (not necessary on the virtual machine anyway):
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
Repair the dpkg database
sudo dpkg --configure -a
Hoped you could give me some pointers about where to look at.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚安装了
zlib1g:i386
和zlib1g-dev:i386
。我正在使用 Ubuntu 22.04.2 LTS。您可以使用以下命令:
I just installed
zlib1g:i386
andzlib1g-dev:i386
. I am using Ubuntu 22.04.2 LTS.You can use the following commands:
我在尝试安装 PetaLinux v2022.1 时在 Ubuntu 24.04 上遇到了类似的问题。您可能有兴趣申请类似的解决方案。
问题是安装程序依赖于zlib1g-dev-1.2.13。对于 Ubuntu 24.04 的 apt repo,您只能提供 1.3 版本。因此,我们需要将其降级。从下面下载旧的软件包
链接。
我不确定步骤中是否缺少任何内容,您已经明白了这个想法。我希望它在构建项目时也能发挥作用。
Xilinx 论坛上的原始帖子
I had a similar problem on Ubuntu 24.04 while trying to install PetaLinux v2022.1. You might be interested in applying for a similar solution.
The problem is that the installer depends on zlib1g-dev-1.2.13. With apt repo for Ubuntu 24.04, you can provide only the 1.3 version. So, we need to downgrade it. Download the older packages from the below
links.
I'm not sure if anything is missing in steps, you already caught the idea. I hope it works when building the project as well.
Original post on Xilinx forum