This error occurs when apt detects held packages with unmet dependencies in a multiarch system. It typically results from installing conflicting packages from multiple architectures or interrupted updates, and can be resolved by checking held packages, using alternative package managers, or fixing broken dependencies.
Multiarch allows installing packages from different architectures on a single system (e.g., 32-bit i386 packages on 64-bit x86_64). When apt detects that held packages have unmet dependencies across architectures, it cannot automatically resolve the conflicts. A "held" package is one marked to prevent upgrades, and when these held packages have broken dependencies, apt cannot find a solution without violating the hold constraint. This commonly happens when different architecture versions of the same package require incompatible versions of their dependencies.
First, identify your system architecture and see if multiarch is enabled:
dpkg --print-architecture
dpkg --print-foreign-architecturesThis shows your primary architecture (usually amd64) and any foreign architectures (like i386) you have enabled.
List all packages currently held by the system:
sudo apt-mark showholdThis displays which packages are preventing apt from making automatic changes. Note any packages related to the multiarch installation you attempted.
Refresh your package lists and check for broken packages:
sudo apt update
sudo apt checkThe apt check command will report any dependency issues in your system.
Release the hold on packages that are causing the conflict. Replace "package-name" with the actual package name:
sudo apt-mark unhold package-nameIf you need to unhold multiple packages, repeat this command for each one. You can also unhold all packages at once:
sudo apt-mark unhold $(apt-mark showhold)Use apt install with the fix-broken flag to attempt automatic dependency resolution:
sudo apt install --fix-brokenThis command will try to resolve unmet dependencies by installing missing packages or adjusting package versions.
If apt still cannot resolve the conflicts, try aptitude, which has a more sophisticated dependency resolver:
sudo aptitude install package-name:archWhen aptitude encounters conflicts, it will suggest alternative solutions. You can also use:
sudo aptitude why-not package-nameto understand why a package cannot be installed.
If dependency resolution fails, remove the problematic package and try again:
sudo apt remove --purge package-name:arch
sudo apt autoremove
sudo apt updateThen attempt to install a compatible version or remove the multiarch requirement.
Multiarch support on Debian and Ubuntu has known limitations. Some packages, particularly older or less-maintained libraries, do not properly support multiarch cross-dependencies. When packages of different architectures require incompatible versions of the same dependency, apt and aptitude may not find a solution without removing one of the architectures. In such cases, you may need to choose between the 32-bit and 64-bit versions. Avoid mixing packages from incompatible Debian/Ubuntu releases (e.g., Sid with Stable) as this creates "FrankenDebian" systems with unresolvable conflicts. If a package is truly unavailable in multiarch, consider alternative packages or building from source with proper architecture-specific flags. The dpkg --configure -a command can sometimes help if the system is left in a broken state from interrupted installations.
E: Could not connect to proxy server
Could not connect to proxy server
E: Package 'package:i386' has no installation candidate
How to fix "Package package:i386 has no installation candidate" in apt
E: The value 'value' is invalid for APT::Default-Release
How to fix invalid APT::Default-Release value in APT
dpkg: error: unable to create new file 'path': Permission denied
How to fix dpkg permission denied errors in APT
subprocess installed post-removal script returned error exit status 1
How to fix "subprocess installed post-removal script returned error exit status 1" in APT