Reputation: 340
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.
Upvotes: 2
Views: 3976
Reputation: 1138
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.
# Remove existing installations for zlib1g-dev-1.3
sudo apt remove zlib1g-dev:i386
sudo apt remove zlib1g-dev
# Install the zlib1g-dev-1.2.1.3
sudo dpkg -i zlib1g_1.2.13.dfsg-1_amd64.deb
sudo dpkg -i zlib1g_1.2.13.dfsg-1_i386.deb
sudo dpkg -i zlib1g-dev_1.2.13.dfsg-1_i386.deb
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.
Upvotes: 1
Reputation: 71
I just installed zlib1g:i386
and zlib1g-dev:i386
. I am using Ubuntu 22.04.2 LTS.
You can use the following commands:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install zlib1g:i386 zlib1g-dev:i386
Upvotes: 5