当前位置:   article > 正文

ubuntu12.04安装软件出现deb包不支持等情况解决_debconf: apt-extracttemplates failed: no such file

debconf: apt-extracttemplates failed: no such file or directory

最大的原因:软件源不合适

比如安装xinetd之类的安装失败出现debconf: apt-extracttemplates failed: No such file or directory等等报错,找了很久找到一个源是12.04可以用的。

完整报错:

apt-get install xinetd

The following NEW packages will be installed:
  xinetd
0 upgraded, 1 newly installed, 0 to remove and 1170 not upgraded.
Need to get 0 B/108 kB of archives.
After this operation, 310 kB of additional disk space will be used.
E: /var/cache/apt/archives/xinetd_1%3a2.3.15.3-1_amd64.deb not a valid DEB package.
E: Prior errors apply to /var/cache/apt/archives/xinetd_1%3a2.3.15.3-1_amd64.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg-deb: error: archive '/var/cache/apt/archives/xinetd_1%3a2.3.15.3-1_amd64.deb' contains not understood data member control.tar.xz, giving up
dpkg: error processing /var/cache/apt/archives/xinetd_1%3a2.3.15.3-1_amd64.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/xinetd_1%3a2.3.15.3-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

解决步骤:

1.sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份

2.sudo vim /etc/apt/sources.list #修改

替换内容:


deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
 

3.保存后更新sudo apt-get update #更新列表

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/195808
推荐阅读
相关标签
  

闽ICP备14008679号