How to fix dpkg: error: package architecture (i386) does not match system (amd64) in APT
This error occurs when trying to install a Debian package built for a different CPU architecture than your system. Enabling multiarch support with dpkg --add-architecture allows you to install packages from different architectures on the same system.
Quick fix
Fixes dpkg: error: package architecture (i386) does not match system (amd64)
dpkg --print-architecture- Check your system architecture
- Enable multiarch support for the required architecture
- Update your package manager cache
- Install the package
dpkg --print-architecturedpkg: error: package architecture (i386) does not match system (amd64)
What this error means
The dpkg package manager is rejecting a package installation because the package binary (i386) is compiled for a different architecture than what your system uses (amd64). This is a safety check to prevent installing incompatible binaries. Modern Linux systems can support multiple architectures simultaneously through a feature called multiarch, which allows installing and running 32-bit applications on 64-bit systems and vice versa.
Typical symptoms
- Installation fails with "package architecture (i386) does not match system (amd64)" error
- Unable to install 32-bit applications on a 64-bit system
- dpkg or apt-get refuses to process the package
- Third-party applications fail to install from .deb files
Common causes
- Multiarch support is not enabled on your system - you have only registered the native architecture
- Installing a .deb package built for 32-bit (i386) on a native 64-bit (amd64) system without enabling i386 support
- Downloading the wrong architecture version of a package
- Repository sources configured for different architectures without explicit architecture declarations
How to fix "dpkg: error: package architecture (i386) does not match system (amd64)"
First, verify what architecture your system is running:
dpkg --print-architectureThis shows your primary architecture (amd64 for 64-bit). You can also check registered foreign architectures with:
dpkg --print-foreign-architecturesAdd support for the foreign architecture (typically i386 for 32-bit on amd64):
sudo dpkg --add-architecture i386For other architectures, replace i386 with arm, arm64, armhf, etc. as needed. This tells dpkg to accept packages from multiple architectures.
After adding a new architecture, update the package lists:
sudo apt-get updateThis rebuilds the package cache to include packages from all registered architectures.
Now you can install the package. If installing from a .deb file:
sudo dpkg -i package.debOr using apt-get, specify the architecture explicitly:
sudo apt-get install package:i386The package should now install without architecture mismatch errors.
Advanced notes
Multiarch enables running binaries of different architectures on the same system by installing architecture-specific runtime libraries alongside the native libraries. Important considerations: (1) Library packages (libc6, libssl, etc.) can coexist for multiple architectures, but application packages often conflict - you may need to uninstall one architecture version before installing another; (2) Development packages (-dev) typically conflict between architectures; you only need the -dev packages for building, not running; (3) Third-party repositories may not support all architectures - add architecture restrictions to /etc/apt/sources.list using [arch=amd64] syntax if needed; (4) The --force option (dpkg --force architecture -i package.deb) can override this check but may break dependencies - use only as a last resort.
Frequently asked questions
- What does "dpkg: error: package architecture (i386) does not match system (amd64)" mean?
- The dpkg package manager is rejecting a package installation because the package binary (i386) is compiled for a different architecture than what your system uses (amd64). This is a safety check to prevent installing incompatible binaries. Modern Linux systems can support multiple architectures simultaneously through a feature called multiarch, which allows installing and running 32-bit applications on 64-bit systems and vice versa.
- How do I fix "dpkg: error: package architecture (i386) does not match system (amd64)"?
- This error occurs when trying to install a Debian package built for a different CPU architecture than your system. Enabling multiarch support with dpkg --add-architecture allows you to install packages from different architectures on the same system.
- What causes "dpkg: error: package architecture (i386) does not match system (amd64)"?
- Multiarch support is not enabled on your system - you have only registered the native architecture Installing a .deb package built for 32-bit (i386) on a native 64-bit (amd64) system without enabling i386 support Downloading the wrong architecture version of a package
- Is the "dpkg: error: package architecture (i386) does not match system (amd64)" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐Debian Multiarch HOWTO(Official Docs)
- ๐ฌDebian User Forums - Multiarch discussion(Stack Overflow)
- ๐ฌLinuxQuestions - Architecture Mismatch Solutions(Stack Overflow)