Rootserver Sponsor



Please support your operating system's further development:


Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Post subject: [amd64] How to get ready for MultiArch  PostPosted: 22.06.2012, 18:30
Team Member

Joined: 2010-09-02
Posts: 485

Status: Offline
This is User Scripts & Dragons forum! You have to be careful: Read this entry and ask questions if you are unsure. Saying 'yes' to question you don't understand could break your system. The entry is work in progress. Comments appreciated.

Warning: Check your system before reading this: This only applies to amd64 systems. i386 systems are not covered!
[In theory you can enable amd64 on capable i386 machines - we call that "cross-grade". It's not supported nor recommend just yet.]

Disclaimer: MultiArch is a release-goal for wheezy. A lot was done in the past years for it and some packages now fast-forward a bit. If you feel like trying it now (and/or you want to install wine, ia32-libs, …) read on. If you have no idea why you would need that (you lucky bastard!) then ignore this.

If you are careful, it's unlikely that you break your system - many debian developers already enabled it and it works flawless in most cases. But as in any other transition there are times in which the repository is in an inconsistent state (or the maintainer of a package just did something wrong) which might trigger APT to find "interesting" solutions to your request.
As MultiArch is a new feature (and a complicated one) you are more likely to hit bugs (same file in different package, different file in packages which should have the same file, …).

It's already strongly recommend to read what APT prints out before confirming the action: This is yet another instance showing that it is really important to do this.

Motivation: Computers come (and go) in different architectures from (for the general public): popular (amd64), hyped (armel) up to obscure ones (s390x).

Some applications might only run on some architectures. "Popular" closed source applications for example are only available for the i386 architecture.

But here is the catch: Many (all?) CPUs which are amd64-compatible (aka 64-bit) can also execute applications created for i386 (aka 32-bit). The only problem with this up until now: Debian tools (aka APT, dpkg, …) had no way to correctly work with packages from a "foreign" architecture.
(Terminology: "native" is the architecture you have is the architecture you installed from. aptosid comes has ISOs for both:'amd64' and 'i386' - the ISO you pick decides which will be your "native" architecture. "foreign" is in contrast everything which is not your "native" architecture)

Howto: I will spare you the extremely heavy details of how this really works and instead will tell you how to get going:
(before you do this, do a proper dist-upgrade and ensure that everything works and is okay!! I am not going to talk to you anymore if you don't.)

dpkg --add-architecture i386
apt-get update

That's about it.

If you try to install a package like "wine" now you will notice that APT has in it's output for some packages ":i386" attached
(now is the time to get excited because that - as this is freaking cool), but you should be able to safely ignore this for now - or forever, as you please.

Again, if you aren't a wine user, ia32-libs or whatever crap^Wnot so nice piece of software: Don't do this. The sideeffect of this action above is doubling the amount of data 'apt-get update' will download. Slowing down APT and dpkg (as more data needs to be processed). Possibly hitting bugs. You have been warned.

Want to know more? Start here ->

FAQ and Troubleshooting
APT wants to remove my pre-multiarch installed (non-free) package. I thought that is the whole freaking point to be able to use them?!?
It's not the whole point, but yes, you can use it. It is just that previously you have installed the "amd64" package of e.g. googleearth – which was just like the "i386" package but depending on ia32-libs – and these have to go now as ia32-libs goes away. Install the "i386" package after you have enabled MultiArch instead as this is the real point: No i386 packages anymore which claim to be amd64 packages just so you can install them.

APT wants to remove a lot of packages and replace it with packages of the same name with :i386 attached. Is that okay?
If you need to ask this, probably not. Say no and post a thread here. Bonuspoints for providing the output of your command with the following flags attached:
-o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1 --simulate

APT wants to install "package" and "package:i386". No removes through. Is that okay?
Yes. Usually "package" will be a library (= usually starts with 'lib') which can co-exist if the package maintainer made no mistake. You can go ahead. APT will tell you as usual if it has to remove a package to comply with your request. This is not such a case.

dpkg fails with an error talking about files in packages
There are two. The one you have seen once in a while already: Two packages contain the same file. Happens at times as maintainers make mistakes once in a while - report a bug here (and in debian).
The other one is new and says that package:amd64 and package:i386 should contain the same file, but they do not have the same content. Again, it is a mistake by a maintainer, report it and everything will be fine.

I have read that in Ubuntu …
Stop reading. All current releases of Ubuntu support MultiArch, but in a slightly different implementation. The APT interface is the same, dpkg differs (completely). Add that their packaging of wine, ia32-libs and other stuff in this field differ widely from how Debian packaged this stuff.

Do I need to modify my sources.list(.d)?
Usually the answer is no. APT will by default get the information for all configured architectures from all configured repositories. If you don't want that (because e.g. some third-party repositories don't provide packages for one of your configured architectures) you can limit the architectures with the option-field. See the 'man sources.list' for an example how exactly.

I have a i386 system, can I convert to amd64? (cross-grade)
It is possible, but only slightly less-hard than before. Probably not a good idea just yet. You will reach your goal with a reinstall a lot faster.

I want to get rid of all i386 packages on my amd64 - how?
How can I make myself "unready" for MultiArch again?
Might be that you have maneuvered yourself into a difficult situation or you just noticed that you don't need i386 software anymore and want to disable it. No problem:
apt-get remove .*:i386 -o pkgProblemResolver::FixByInstall=0

(Yes, the -o flag is needed to forbid APT to try to fix broken dependencies by installing new packages).
After that remove the architecture from dpkg with
dpkg --remove-architecture i386
apt-get update

[2012-07-01] add: Terminology and Troubleshoot; Disclaimer verbosity++
[2012-09-19] add FAQ: howto remove all i386 packages
[2012-11-10] add FAQ: "fake amd64" vs "real i386" (non-free) package

MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio