apt error doesn’t support architecture ‘i386’
On an Ubuntu server, when running “apt update” command, I got the following error message
1 2 3 4 5 6 7 8 9 10 11 |
root@s196379:~# apt update Hit:1 http://mirror.fcix.net/ubuntu focal InRelease Hit:2 http://mirror.fcix.net/ubuntu focal-updates InRelease Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease Hit:4 https://mirror.rackspace.com/mariadb/repo/10.5/ubuntu focal InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://mirror.rackspace.com/mariadb/repo/10.5/ubuntu focal InRelease' doesn't support architecture 'i386' root@s196379:~# |
This error is because the repository do not support i386. To fix the error, edit the file
1 |
vi /etc/apt/sources.list |
Find
1 |
deb https://mirror.rackspace.com/mariadb/repo/10.5/ubuntu focal main |
Replace with
Find
1 |
deb [arch=amd64] https://mirror.rackspace.com/mariadb/repo/10.5/ubuntu focal main |
Solution 2: Remove i386 support
Check your architecture
1 |
dpkg --print-architecture |
If you are using 64 bit OS, you will see amd64.
Check if multiarch is enabled
1 |
dpkg --print-foreign-architectures |
If you get “i386”, you have multiarch enabled.
If you don’t have any i386 applications running, you can remove i386 support with
1 |
dpkg --remove-architecture i386 |
If you want to enable i386 support, you can run
1 |
dpkg --add-architecture i386 |
Back to apt