How to fix Repository doesn't support architecture 'i386'

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to fix "Repository doesn't support the architecture 'i386'.

Why does this error happen?

This error happen when your system is 64bit but the repository is not configured correctly, and it ends up downloading the 32bit version of the package.

For example, in our case this error happened when we were trying to install node.js on our Ubuntu machine, without specifying which architecture type to use when downloading it.

So when we ran sudo apt update to update the package index, so that we could use the Node.js repository, we encountered the following error.

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://deb.nodesource.com/node_18.x nodistro InRelease' doesn't support architecture 'i386'

To fix this error, simply follow the steps below.

Fix repository doesn't support architecture 'i386'

This error can be fixed easily by setting the right architecture type of your system in the repository file of Node.js or any other package that is causing the same error.

Like we mentioned, in our case Node.js repository was causing this error, so to fix this error, we need to set the architecture type to 64bit to the Node.js repository file, which is located at /etc/apt/sources.list.d directory.

To do so, simply follow the steps below.

1) Open nodesources.list with a text editor

nodesource.list is located at /etc/apt/sources.list.d/nodesource.list, so to edit this file, simply run the command below.

sudo nano /etc/apt/sources.list.d/nodesources.list

2) Setup 64bit architecture

Once nodesource.list is opened in your terminal, you should see a similar configuration.

deb signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_node_version.x nodistro main

As you can see, architecture type is not set in the Node.js repository.

Now to set the architecture type to 64bit simply set [arch=amd64] to the repository.

So the Node.js repository should look like this.

deb [arch=amd64 signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_node_version.x nodistro main

3) Update your system

Now you need to simply update the package index on your Ubuntu machine, and see if you encounter this error again after setting the architecture type to 64bit.

sudo apt update

As you can see, now when we run sudo apt update we don't get the "repository doesn't support architecture type 'i386' anymore. This means Node.js repository is now set to download the right architecture type of Node.js.

Conclusion

In this tutorial, you learned how to fix " N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://deb.nodesource.com/node_18.x nodistro InRelease' doesn't support architecture 'i386'", by manually setting the architecture type to 64bit in the repository file /etc/apt/sources.list.d/nodesource.list