执行apt-get install xxxx时,报以下错误
E: There are problems and -y was used without –force-yes
解决方案:
vim /etc/apt/sources.list
删除原有,添加如下:
deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse deb-src http://old-releases.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
注意:这里使用的是ubuntu的源,也可以网上找源去,不过bt系列的源已经停止更新了,部分软件已经找不到了
kali可以添加以下源:
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
替换源
apt-get update
如果把源改了以后,在bt5上执行apt-get install xxx时报以下错误
E: Sub-process /usr/bin/dpkg returned an error code (1)
处理方法:
mv /var/lib/dpkg/info /var/lib/dpkg/info.bak //现将info文件夹更名 mkdir /var/lib/dpkg/info //再新建一个新的info文件夹 apt-get update apt-get -f install mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bak rm -rf /var/lib/dpkg/info //把自己新建的info文件夹删掉 mv /var/lib/dpkg/info.bak /var/lib/dpkg/info //把以前的info文件夹重新改回名字 apt-get update
最后:bt系列的源不再更新了,上述方法可能不能够完全解决你的问题,建议用kali去做任务