apt - 安装软件包的问题

分享于 

4分钟阅读

ubuntu

  繁體

问题

我无法安装软件包,得到这个错误:


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

解决这个问题的方法,超级简单的方法; )

multiarch-support is unpacked, but has never been configured 这意味着软件包即将配置,但尚未配置。

当状态为unpacked时,尚未安装软件包,因此无法安装软件包libgcc1,因为依赖关系尚未安装,所以无法安装。

我们必须强制multiarch支持安装状态来执行这个操作。


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

我认为你的包管理出现了不可恢复的损坏。


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


答案3

可能是你没有安装debconf。要安装或检查它是否已安装,请键入sudo apt-get install debconf 在终端中,你可以同时按CTRL-ALT-T来启动终端。



PAC  PACK  installing  APT  
相关文章