如何修复 E:内部错误,没有 libc6 的文件名,如果我这样做就会显示:
$ sudo apt-get upgrade
or
$ sudo apt-get install package
这是示例:
$ 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
我已按照此处的指示进行操作使用 apt-get remove 时如何解决 E:内部错误?. 哪些可以:
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
E: Internal Error, No file name for libc6
但是在执行命令时 仍然出现同样的错误sudo apt-get install -fy
。
我一直在谷歌上寻找,但到现在还没有成功。
谢谢。
答案1
我知道这是一个老话题,但我最近在升级 12.04 LTS 时遇到了这个问题。这里的所有解决方案都无法完全解决我的问题。深入研究后,我发现这与升级过程中 libc6 i386 的升级有关:
$> 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:
经过多次修改,这个方法似乎奏效了。目标是删除升级失败的有问题的 libc6 软件包,并逐步使其余升级工作正常进行,最终也会升级 libc6 软件包。
运行升级(将会失败):
sudo apt-get upgrade
然后从缓存中安装我们可以安装的文件(对于某些文件会成功,但对于其他文件会失败):
sudo dpkg -i /var/cache/apt/archives/*.deb
删除有问题的 libc6(不要清除)。这将导致许多依赖关系中断,不用担心,我们很快就会修复它们。
sudo dpkg -r --force-depends libc6:i386
重新配置它和其他包(大部分都会成功):
sudo dpkg --configure -a
从缓存中取得更多进展(有些成功,有些失败):
sudo dpkg -i /var/cache/apt/archives/*.deb
现在运行另一个升级,它将下载所需的包(安装将失败):
sudo apt-get upgrade
如果您很幸运,它可能从这里开始工作,但如果不,再进行一轮缓存安装即可。
从缓存中再次安装(将会成功!)
sudo dpkg -i /var/cache/apt/archives/*.deb
现在您可以检查进一步的安装/升级是否会成功。
答案2
尝试这个:
sudo rm -f /etc/apt/sources.list.d/*
sudo dpkg --configure -a
答案3
以下解决方案对我解决此问题有用:
sudo rm -f /etc/apt/sources.list.d/*
sudo dpkg --configure -a
答案4
我尝试了以下方法来帮助我解决问题:
dpkg -i /var/cache/apt/archives/*.deb
dpkg --configure -a