Why can't I install 'arm64' packages on an 'amd64' system when I can install 'armhf' packages?

21,341

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...

Share:
21,341
user541686
Author by

user541686

Updated on September 18, 2022

Comments

  • user541686
    user541686 over 1 year

    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?