How to install i386
There are some times when you want to install a package that is labelled as 'i386'. Unless your system is set up to use 'multiarch' you won't be able to install it.
- So to set up multiarch you just do
sudo dpkg --add-architecture i386, - Then do
sudo apt-get update - Then you can hopefully install your 'i386' programme.
How to remove i386
If you decide that you no longer want to use i386 and just have a plain amd64 then
- first of all convert all entries in your
sources.listto be all like this -
deb [arch=amd64] http://security.debian.org/ jessie/updates main contrib non-free
deb-src [arch=amd64] http://foo
So that every entry now shows [arch=amd64].
- Don't forget to look in
/etc/apt/sources.list.dto see if there is anything likedropboxlurking there. If so, you can either leave it there but change it to 'amd64' like all other entries in your sources.list, - Or you can copy its entry to your
/etc/apt/sources.listand delete it from/etc/apt/sources.list.d. Your choice. I decided to incorporate it into my sources.list which makes it easier to control. - Then look at
/var/cache/apt/archivesand go through it removing all 'i386' files. Its tedious, but I've found that it helped. - Then do
dpkg --print-foreign-architectureswhich if it showsi386then you haven't succeeded, yet! - So do
sudo apt-get updateand examine its output closely to see if there are any references to 'i386' still showing, if so then you're back to sorting out your 'sources.list'! - Then do another
sudo apt-get updateand re-examine the output. - Once you're satisfied that everything now is going to be 'amd64', we move on to phase 2 - removing i386.
- And this is just so ridiculously easy - to remove 'i386' you do
sudo dpkg --remove-architecture i386. - To check that it has fully removed, you can just repeat
dpkg --print-foreign-architectureswhich should not have any output, and -
to make sure just do
dpkg --print-architecturewhich should show 'amd64'. -
Result? Success!
-
But, if when you do
sudo dpkg --remove-architecture i386it shows -
dpkg:error: cannot remove architecture 'i386' currently in use by the database
- You need to do
sudo apt-get -fto try to clear any references to 'i386' - Then repeat
sudo apt-get update - and do
sudo dpkg --remove-architecture i386. - To check that it has fully removed, you can just repeat
dpkg --print-foreign-architectureswhich should not have any output, and -
to make sure just do
dpkg --print-architecturewhich should show 'amd64'. -
Result? Success!
Comments
comments powered by Disqus