Can't install because of missing/broken (virtual) packages

6,415

On etch, the apt package is supposed to provide libapt-pkg-libc6.3-6-3.11, but in your case it does not seem to be the case. Could you check that your apt provides it?

apt-cache show apt | grep "Provides:"

Then, it says apt cannot be downloaded. Are you sure you ran apt-get update before trying your installation commands? If your sources.list were ruined before and then fixed, the changes will only be taken into consideration once you update your apt cache.

Share:
6,415

Related videos on Youtube

Agos
Author by

Agos

Updated on September 17, 2022

Comments

  • Agos
    Agos over 1 year

    First: I come from stackoverflow - I'm a programmer, not a sysadmin. Please be understanding of my ineptitude with these matters; I'll try to be as precise as possible (retagging and re-titling may be appropriate).

    I have a dependency situation which I can't just figure out on a Debian Etch system.
    I've been called to do some maintenance work on a php app; since I needed the locales package, I tried what I thought the easiest way: apt-get install locales, which failed because of unmet dependencies with a virtual glibc package. From my understanding, this was caused by mixed sources (all packages were already upgraded)
    I asked aptitude install locales if he could fix things, and he did (some packages were downgraded), but aptitude itself was removed.
    There's no discussing: that was a dumb thing to do on my part. But the server is still happily running (thanks Debian!), so the situation is not critical.

    The question is: the package situation does not look resolved. If I try to reinstall aptitude, this is what I get:

    lsrl:~# apt-get install aptitude
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
      aptitude: Depends: libapt-pkg-libc6.3-6-3.11
    E: Broken packages
    

    If I try to install libapt:

    lsrl:~# apt-get install libapt-pkg-libc6.3-6-3.11
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package libapt-pkg-libc6.3-6-3.11 is a virtual package provided by:
    You should explicitly select one to install.
    E: Package libapt-pkg-libc6.3-6-3.11 has no installation candidate
    

    If I try to reinstall apt:

    lsrl:~# apt-get --reinstall install apt
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Reinstallation of apt is not possible, it cannot be downloaded.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    My sources:

    lsrl:~# cat /etc/apt/sources.list
    # 
    # deb cdrom:[Debian GNU/Linux 4.0 r4a-etchnhalf _Etch-and-a-half_ - Official i386 NETINST 20080804-22:00]/ etch main
    
    #deb cdrom:[Debian GNU/Linux 4.0 r4a-etchnhalf _Etch-and-a-half_ - Official i386 NETINST 20080804-22:00]/ etch main
    
    deb http://ftp.it.debian.org/debian/ etch main contrib non-free
    deb-src http://ftp.it.debian.org/debian/ etch main contrib non-free
    # deb http://ftp.it.debian.org/debian/ testing main contrib non-free
    # deb-src http://ftp.it.debian.org/debian/ testing main contrib non-free
    
    deb http://security.debian.org/ etch/updates main contrib non-free
    deb-src http://security.debian.org/ etch/updates main contrib non-free
    
    deb http://volatile.debian.org/debian-volatile etch/volatile main
    deb-src http://volatile.debian.org/debian-volatile etch/volatile main
    

    This is so similar to what was happening before with glibc that I have reason to believe that there are still some mixed sources/packages... are there?
    Is there any way I can get all this to work properly?

  • Agos
    Agos over 14 years
    Yes, I tried: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ...and nothing changed.
  • Agos
    Agos over 14 years
    Yes, I always did apt-get update before. lsrl:~# apt-cache show apt | grep "Provides:" Provides: libapt-pkg-libc6.9-6-4.8 Provides: libapt-pkg-libc6.3-6-3.11 Provides: libapt-pkg-libc6.3-6-3.11
  • BJladu4
    BJladu4 over 14 years
    Ah, so you have 3 different apt available, and I guess the one that is installed is the one that provides libapt-pkg-libc6.9-6-4.8. Very likely, the machine was half upgraded at some point. The apt that provides libapt-pkg-libc6.9-6-4.8 is the one from sid, not even lenny or squeeze. If you're there, it's very likely that most of your system is already upgraded, so downgrading apt is a bad idea. Try to upgrade the whole system to lenny and see if it fixes things. They squeeze if it fails. Reinstall otherwise...
  • BJladu4
    BJladu4 over 14 years
    Note: if you still want to try downgrading apt, you can force it with apt-get install apt=0.6.46* to force etch's version of apt.
  • Agos
    Agos over 14 years
    Thanks, but I'm quite afraid of possible damage. This is a production server, and I have no backup/development/test/whatever server, so I'm really concerned about what could go wrong. Does upgrading to Lenny imply any risk of breaking things?
  • BJladu4
    BJladu4 over 14 years
    Did you try downgrading apt already? Upgrading to Lenny might break some things, but it's also a good idea because Etch will soon have no security support.
  • Agos
    Agos over 14 years
    Downgrading apt worked. I love you (in a platonic, abstract way).