Score:1

Why I was not able to get any system updates (via both software Updater & APT) after adding foreign architecture?

pt flag

After adding a new foreign architecture to Ubuntu 21.04 I was no longer able to get any updates using niether automatic software updater, nor apt update.

The only workaround I found was removing the added foreign architecture (in this case armhf) by issuing sudo dpkg --remove-architecture armhf.

Right after removing it, I got the accumulated updates since the foreign architecture was added till after removing it (without rebooting the system).

I would like to know the resoan(s) of the issue. (Was it a bug? anyone else facing it?)

Thanks for your time and effort answering my question in advanced.

Edit 1:

Output of dpkg --print-foreign-architectures was:

i386 armhf

Output of dpkg --print-architecture is:

amd64

The problem was on ASUS N551JW laptop.

N0rbert avatar
zw flag
Please add the output of `dpkg --print-foreign-architectures` and `dpkg --print-architecture` to the question. What kind of hardware do you use?
Shobeira avatar
pt flag
Thanks for your comment. The info is added to the original post. @N0rbert
Score:1
zw flag

Two moments about armhf CPU architecture - it needs virtualization, its packages are located in different mirror server.

So when you run the following commands on fresh amd64 system:

sudo dpkg --add-architecture armhf

you will get the following errors on next run of sudo apt-get update:

E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/hirsute/multiverse/binary-armhf/Packages  404  Not Found [IP: 192.168.3.222 8000]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/hirsute-updates/main/binary-armhf/Packages  404  Not Found [IP: 192.168.3.222 8000]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/hirsute-security/universe/binary-armhf/Packages  404  Not Found [IP: 192.168.3.222 8000]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/hirsute-backports/universe/binary-armhf/Packages  404  Not Found [IP: 192.168.3.222 8000]
E: Some index files failed to download. They have been ignored, or old ones used instead.

so APT will become seriously broken.

So you have remove armhf foreign architecture from the system by sudo dpkg --remove-architecture armhf and then run sudo apt-get update again to keep things in order.

From my understanding there is only one correct foreign architecture for amd64 - it is 32-bit variant named i386. Many packages are using it, for example Wine.

Shobeira avatar
pt flag
I got exactly same errors as you displayed it. Is there any other procedure/instruction I need to follow in order to get it running on my system? (I mean having the armhf alongside..) As you mentioned virtualisation, I had also installed QEMU. How to make the addition of armhf architecture work without corruption of APT?
N0rbert avatar
zw flag
Check [this answer](https://askubuntu.com/a/1346397/66509), but replace `arm64` with `armhf` ; and `/usr/bin/qemu-aarch64-static` with `/usr/bin/qemu-arm-static`.
Shobeira avatar
pt flag
The provided answer link (with suggested subtitution) doesn't help. I am getting the same error as you illustrated above. Although, I added the armhf architecture before running your suggested codes in the povided link.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.