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.list
to 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.d
to see if there is anything likedropbox
lurking 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.list
and 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/archives
and go through it removing all 'i386' files. Its tedious, but I've found that it helped. - Then do
dpkg --print-foreign-architectures
which if it showsi386
then you haven't succeeded, yet! - So do
sudo apt-get update
and 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 update
and 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-architectures
which should not have any output, and -
to make sure just do
dpkg --print-architecture
which should show 'amd64'. -
Result? Success!
-
But, if when you do
sudo dpkg --remove-architecture i386
it shows -
dpkg:error: cannot remove architecture 'i386' currently in use by the database
- You need to do
sudo apt-get -f
to 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-architectures
which should not have any output, and -
to make sure just do
dpkg --print-architecture
which should show 'amd64'. -
Result? Success!
Comments
comments powered by Disqus