28

How to fix E: Internal Error, No file name for libc6, Like that will show If I do:

$ sudo apt-get upgrade
or
$ sudo apt-get install package 

This is example :

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  ginn hplip hplip-data libdrm-dev libdrm-intel1 libdrm-nouveau1a
  libdrm-radeon1 libdrm2 libgrip0 libhpmud0 libkms1 libsane-hpaio
  libunity-2d-private0 libunity-core-5.0-5 linux-generic-pae
  linux-headers-generic-pae linux-image-generic-pae printer-driver-hpcups
  printer-driver-hpijs unity unity-2d-common unity-2d-panel unity-2d-shell
  unity-2d-spread unity-common unity-services
The following packages will be upgraded:
  alsa-base firefox firefox-globalmenu firefox-gnome-support firefox-locale-en
  icedtea-6-jre-cacao icedtea-6-jre-jamvm icedtea-7-jre-jamvm libdbus-glib-1-2
  libdbus-glib-1-dev libgnutls-dev libgnutls-openssl27 libgnutls26
  libgnutlsxx27 libssl-dev libssl-doc libssl1.0.0 linux-sound-base
  openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib openjdk-7-jdk
  openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib openssl sudo
27 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
3 not fully installed or removed.
Need to get 0 B/126 MB of archives.
After this operation, 3,072 B of additional disk space will be used.
Do you want to continue [Y/n]? y
E: Internal Error, No file name for libc6

I have follow instruction from here How to resolve E: Internal Error when using apt-get remove? . Which do:

sudo apt-get update
sudo apt-get clean
sudo apt-get install -fy
sudo dpkg -i /var/cache/apt/archives/*.deb
sudo dpkg --configure -a
sudo apt-get install -fy
sudo apt-get dist-upgrade

But stuck with same error E: Internal Error, No file name for libc6 when do command sudo apt-get install -fy.

And I've been looking on google, but have not been successful until now.

Thanks.

2

4 Answers 4

29

I know this is as old thread, but I encountered this problem recently during an upgrade of 12.04 LTS. None of the solutions here fully fixed my problem. After diving into it further, I found that it had something to do with the upgrade of libc6 i386 during an upgrade:

$> dpkg -i /var/cache/apt/archives/libc6_2.15-0ubuntu10.6_i386.deb
(Reading database ... 259895 files and directories currently
installed.) Preparing to replace libc6:i386 2.15-0ubuntu10.5 (using
.../libc6_2.15-0ubuntu10.6_i386.deb) ... dpkg: error processing
/var/cache/apt/archives/libc6_2.15-0ubuntu10.6_i386.deb (--install): 
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:

After much tinkering, this seemed to work for. The goal is to remove the offensive libc6 package that fails to upgrade, and incrementally get the rest of the upgrade to work, which eventually also upgrades the libc6 package.

  1. Run the upgrade (which will fail):

    sudo apt-get upgrade

  2. Then install the files we can from the cache (will succeed for some, but fail for others):

    sudo dpkg -i /var/cache/apt/archives/*.deb

  3. Remove the offensive libc6 (do not purge). It will cause a lot of dependencies to break, don't worry we'll fix them soon.

    sudo dpkg -r --force-depends libc6:i386

  4. Reconfigure it and other packages (will mostly succeed):

    sudo dpkg --configure -a

  5. Make a bit more more progress from cache (succeed for some, fail for others):

    sudo dpkg -i /var/cache/apt/archives/*.deb

  6. Now run another upgrade which will download needed packages (will fail on install):

    sudo apt-get upgrade

If you're lucky, it might start working from here, but if not, one more round of cache installs will do it.

  1. Install again from cache (will succeed!)

    sudo dpkg -i /var/cache/apt/archives/*.deb

Now you can check that further installs/upgrades will succeed.

4
  • 1
    Can we make this a bash while loop?
    – Dan R
    Aug 13, 2014 at 17:55
  • In my case, executing dpkg -i /var/cache/apt/archives/*.deb was enough. It encountered no errors and dpkg --configure -a exited without an error afterwards. Jun 2, 2016 at 5:57
  • 4
    The dpkg -r --force-depends libc6:i386 command seems to be as dangerous as it looks - after doing so, my /bin, /usr/bin etc. directories were gone, unmounted or empty! (no important machine, an internal development server only, which can easily be setup anew). Thus, it might be wise to try the other solutions first ...
    – Tobias
    Jan 3, 2017 at 17:02
  • Well, if "will succeed!" means "will leave you still having exact same errors that this whole long procedure claims to fix!", then yes, it did succeed. In conventional language, though, this whole procedure appears to have accomplished literally nothing at all.
    – John Smith
    Nov 10, 2023 at 1:27
13

Try this:

sudo rm -f /etc/apt/sources.list.d/*
sudo dpkg --configure -a
4
  • 6
    just the dpkg --configure -a worked for me Nov 9, 2013 at 23:13
  • As for me - that directory only contained google chrome sources, which I don't believe was the issue. Pretty sure mine was directly related to me having previously added debian 9 sources.
    – XtrmJosh
    Jan 12, 2016 at 14:01
  • I am reinstalling python3.5, and meet op's error, dpkg --configure -a get dpkg: error processing package python3.5-dev (--configure):
    – Mithril
    Feb 10, 2017 at 6:40
  • Doesn't fix the error.
    – John Smith
    Nov 10, 2023 at 1:29
1

The following solution worked for me to resolve this issue:

sudo rm -f /etc/apt/sources.list.d/*

sudo dpkg --configure -a
1
  • It did nothing at all for me.
    – John Smith
    Nov 10, 2023 at 1:30
1

I tried the following which helped me to resolve the issue:

dpkg -i /var/cache/apt/archives/*.deb
dpkg --configure -a 

credit goes to poster on the forum http://ubuntuforums.org/showthread.php?t=2185185

1
  • Same nonworking "solution" as a few posts above. Doesn't work.
    – John Smith
    Nov 10, 2023 at 1:30

Not the answer you're looking for? Browse other questions tagged .