[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#632176: libc6: Needs to conflict with lib64* packages on amd64

On 2011-06-30 18:36 +0200, Jonathan Nieder wrote:

> Sven Joachim wrote:
>> On multiarch-enabled i386 systems, installing libc6:amd64 together with
>> lib64foo:i386 has some interesting effects.
> [...]
>> # apt-get install libc6:amd64
>> # apt-get install lib64ncurses5
>> # bash
>> You get an error message: "bash: error while loading shared libraries:
>> libncurses.so.5: wrong ELF class: ELFCLASS64".
> Weird and scary.  Any idea why this happens?

I can even explain exactly why. :-)  Because I had no /lib64 directory
before, installing libc6:amd64 created the /lib64 -> /lib symlink, and
then installing lib64ncurses5 created /lib64/libncurses.so.5,
overwriting the existing /lib/libncurses.so.5 from libncurses5 through
the symlink.  This is a file conflict that dpkg does not notice.

>> The effects of installing libc6:amd64 _after_ lib64ncurses5 will also be
>> interesting, since /lib64 does not get converted to a symlink in that
>> case, AFAICS.
> I hope installing libc6:amd64 before does not change /lib64 into a
> symlink, either (maybe that is what is happening here).

If /lib64 already exists, it will not be converted.  This means that
removing libc6-amd64 will instantly break all 64-bit programs, because
/lib64/ld-linux-x86-64.so.2 is gone and you are left with
/lib/ld-linux-x86-64.so.2 which is in the wrong directory. :-/


Reply to: