我无法安装任何软件包,因为出现此错误:
installArchives() failed: E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
dpkg: regarding .../libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb containing libgcc1:amd64, pre-dependency problem:
libgcc1 pre-depends on multiarch-support
multiarch-support is unpacked, but has never been configured.
dpkg: error processing /var/cache/apt/archives/libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb (--unpack):
pre-dependency problem - not installing libgcc1:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb
Error in function:
dpkg: dependency problems prevent configuration of libc6:amd64:
libc6:amd64 depends on libgcc1; however:
Package libgcc1 is not installed.
libc6:amd64 depends on tzdata; however:
Package tzdata is not installed.
dpkg: error processing libc6:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of multiarch-support:
multiarch-support depends on libc6 (>= 2.3.6-2); however:
Package libc6:amd64 is not configured yet.
dpkg: error processing multiarch-support (--configure):
dependency problems - leaving unconfigured
答案1
这是解决这个问题的方法,非常简单;)
有时您必须使用 dpkg direct 来解决此问题。
“又来了”
该包multiarch-support is unpacked, but has never been configured
意味着该包即将配置,但尚未配置。
当状态为 时,表示unpacked
包尚未安装,因此libgcc1
由于依赖项尚未安装且之前无法安装,因此无法安装该包multiarch-support
。
我们必须强制安装多架构支持的状态才能解决问题。
nano /var/lib/dpkg/status
找到以类似以下内容开头的行Package:
:
Package: multiarch-support
Status: install ok unpacked
您必须将其更改unpacked
为installed
现在尝试:
sudo dpkg --configure --pending
sudo apt-get install --reinstall multiarch-support libgcc1 debconf
我认为您可以通过这种方式让系统重新运行,如果可以的话请告诉我。
答案2
我认为您的/var/lib/dpkg
目录及其内容已损坏。主要是因为这行代码,我认为您的包管理已损坏且无法恢复。
multiarch-support is unpacked, but has never been configured.
此外,
apt-extracttemplates failed: No such file or directory
意味着/usr/bin/apt-extracttemplates
你的系统上不可用,即真的与众不同。
这不是自动中断的;数据损坏或用户错误(例如rm -rf files-you-should-never-delete
)是导致此问题的原因。我最好的办法是备份您的数据(例如/home
)并开始全新安装。
答案3
问题可能是您没有debconf
安装。要安装它或检查它是否已安装,请sudo apt-get install debconf
在终端中输入。您可以通过CTRL-ALT-T
同时按下来调出终端。
如果尚未安装,则将进行安装debconf
;如果已安装但已过期,则进行升级;如果已更新,则不执行任何操作。
答案4
我遇到了同样的问题,因为我删除了 /var/lib/dpkg/available,但是完成这些步骤后我的系统恢复正常了,
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo dpkg --configure -a