How to fix E: Internal Error, No file name for libc6 [duplicate]

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.


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.


Try this:

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