解决apt-get 安装出现 E:unable to locate package 问题

时间:2024-03-19 08:33:08

问题:

在使用apt-get命令安装的时候会出现下边提示:E: Unable to locate package

解决apt-get 安装出现 E:unable to locate package 问题

解决:

进入/etc/apt目录,找到sources.list文件,

解决apt-get 安装出现 E:unable to locate package 问题

将以下内容复制进sources.list文件:

# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL $

# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL $

## Security updates

deb http://http.kali.org/ /kali main contrib non-free

deb http://http.kali.org/ /wheezy main contrib non-free

deb http://http.kali.org/kali kali-dev main contrib non-free

deb http://http.kali.org/kali kali-dev main/debian-installer

deb-src http://http.kali.org/kali kali-dev main contrib non-free

deb http://http.kali.org/kali kali main contrib non-free

deb http://http.kali.org/kali kali main/debian-installer

deb-src http://http.kali.org/kali kali main contrib non-free

deb http://security.kali.org/kali-security kali/updates main contrib non-free

deb-src http://security.kali.org/kali-security kali/updates main contrib non-fr$

执行 apt-get update 命令,等待更新完成

解决apt-get 安装出现 E:unable to locate package 问题

执行 apt-get upgrade,继续等待,

解决apt-get 安装出现 E:unable to locate package 问题

源更新完成,执行安装命令,完成。

解决apt-get 安装出现 E:unable to locate package 问题