If you're working with VirtualBox source builds on Debian x86_64 systems, you might encounter this dependency chain:
ia32-libs → ia32-libs-i386 → (unavailable)
This stems from Debian's transition to multiarch support several years ago. The old ia32-libs
package was essentially a meta-package that pulled in 32-bit libraries for 64-bit systems.
Instead of the deprecated approach, configure multiarch properly:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install gcc-multilib
For VirtualBox compilation, you'll typically need these instead:
sudo apt install \
build-essential \
libssl-dev \
libcap-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
libasound2-dev \
libpulse-dev
If you absolutely must satisfy the old dependency chain, try:
sudo apt install libc6:i386 libstdc++6:i386
Your sources.list
shows mixed releases (unstable + testing). Consider standardizing:
deb http://ftp.us.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main
Use these commands to analyze dependency issues:
apt-cache depends virtualbox
apt-cache showpkg ia32-libs
apt-get -s install virtualbox
Since Debian Wheezy (7.0), the traditional ia32-libs
package has been deprecated in favor of the multiarch system. The error you're seeing occurs because your system isn't properly configured for multiarch support, which is now the standard way to run 32-bit applications on 64-bit systems.
First, let's enable multiarch and install the essential 32-bit libraries:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libc6:i386 libstdc++6:i386
For building VirtualBox, you'll need these specific packages instead of the old ia32-libs
:
sudo apt install gcc-multilib g++-multilib \
lib32z1 lib32ncurses5 lib32bz2-1.0 \
libx11-6:i386 libgl1-mesa-glx:i386
If you encounter dependency conflicts, try:
sudo apt -f install
sudo apt --fix-broken install
For mixed release systems (as seen in your sources.list), consider:
sudo apt install -t unstable package-name:i386
Check your multiarch configuration with:
dpkg --print-foreign-architectures
Should return i386
among the listed architectures.
For complex build environments, consider setting up a 32-bit chroot:
sudo apt install debootstrap schroot
sudo debootstrap --arch=i386 unstable /srv/chroot/unstable-i386