error: package architecture (amd64) does not match system (i386)

Solution 1:

The answer lies hidden in the documentation of dpkg:

dpkg --print-architecture

will show you the architecture dpkg is willing to install packages for.

If the architecture amd64 is not listed, an amd package will be refused, even if all else seems fine. Now you can try to add it with the following command:

dpkg --add-architecture amd64

and show it by using the command:

dpkg --print-foreign-architectures

On a system that was clearly installed as amd64, I had success in making dpkg trying to install the package. Of course further problems may be detected, such as failed dependencies.

Solution 2:

The different variants of uname gives an indication of the kernel that you have installed.

This in turn gives a clue as to the version of Ubuntu you have installed as well as the explanation of your error

error: package architecture (amd64) does not match system (i386)

On a 64bit install you would expect something like:

Linux emachine 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon Mar 11 22:17:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

The key part is x86_64 which indicates a 64bit installation.

Your output - i686 indicates that you have installed a 32bit version of Ubuntu.

Some useful links at the end - suffice to say - you cannot install a 64bit debian package on a 32bit system. That is what your error message is basically informing you.

You'll need the 32bit variant of the package - it usually ends with the name i386.deb.


Useful links:

  • Difference between the i386 download and the amd64?

  • Is it possible to "upgrade" from a 32bit to a 64bit installation?

  • How do I check if I have a 32-bit or a 64-bit OS?