ubuntu12.04安装软件出现deb包不支持等情况解决

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

比如安装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 #更新列表

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值