9

Pretty self-explanatory: could someone tell me why I get the error

$ sudo apt-get install gcc-6-base:arm64
dpkg: error processing archive /var/cache/apt/archives/gcc-6-base_6.0.1-0ubuntu1_arm64.deb (--unpack):
 package architecture (arm64) does not match system (amd64)
Errors were encountered while processing:
 /var/cache/apt/archives/gcc-6-base_6.0.1-0ubuntu1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

when

$ sudo apt-get install gcc-6-base:armhf
Selecting previously unselected package gcc-6-base:armhf.
(Reading database ... 219445 files and directories currently installed.)
Preparing to unpack .../gcc-6-base_6.0.1-0ubuntu1_armhf.deb ...
Unpacking gcc-6-base:armhf (6.0.1-0ubuntu1) ...
Setting up gcc-6-base:armhf (6.0.1-0ubuntu1) ...

works just fine on my AMD64 system? How do I fix this?

user541686
  • 4,347

1 Answers1

18

Never mind, I figured it out. You need to run:

sudo dpkg --add-architecture arm64

And you can see the list of existing architectures added via:

sudo dpkg --print-foreign-architectures

Why they think the user must be initially joking about the explicit :arm64 suffix is beyond me. It's not like you don't already have to explicilty add arm64 as an architecture in /etc/sources.list...

user541686
  • 4,347