ubuntu 使用apt-get安装软件时一直提示E:unable to locate package

问题解决了,还是源的问题,网上找的那些源都是很久以前的了,很多的可能都不能用了;
自己重新下载了一个ubuntu 14.04版本装上,这个可以正常使用,然后将这个里面的更新源地址放原来那个里面去,运行sudo apt-get update或apt-get update 更新后就可以安装软件了。
下面是Ubuntu 14.04的/etc/apt/source.list文件的内容,如果是Debian,请复制Debain的源到此文件。

#deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ – Release amd64 (20140417)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

Debian源对应版本更新源
############网易163
(1)lenny版本
deb http://mirrors.163.com/debian lenny main non-free contrib
deb http://mirrors.163.com/debian lenny-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security lenny/updates main contrib non-free
deb-src http://mirrors.163.com/debian lenny main non-free contrib
deb-src http://mirrors.163.com/debian lenny-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian-security lenny/updates main contrib non-free
(2)squeeze版本
deb http://mirrors.163.com/debian squeeze main non-free contrib
deb http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security squeeze/updates main contrib non-free
deb-src http://mirrors.163.com/debian squeeze main non-free contrib
deb-src http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian-security squeeze/updates main contrib non-free
(3)wheezy版本
deb http://mirrors.163.com/debian wheezy main non-free contrib
deb http://mirrors.163.com/debian wheezy-proposed-updatesmain contrib non-free
deb-src http://mirrors.163.com/debianwheezy main non-free contrib
deb-src http://mirrors.163.com/debianwheezy-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-securitywheezy/updates main contrib non-free
deb-src http://mirrors.163.com/debian-securitywheezy/updates main contrib non-free
############中国科技大学:
(1)squeeze版本
deb http://ftp.cn.debian.org/debian squeezemain
deb-src http://ftp.cn.debian.org/debiansqueeze main
deb http://ftp.cn.debian.org/debiansqueeze-updates main
deb-src http://ftp.cn.debian.org/debiansqueeze-updates main
debhttp://ftp.cn.debian.org/debian-backports squeeze-backports main
deb-srchttp://ftp.cn.debian.org/debian-backports squeeze-backports main
deb http://security.debian.org/squeeze/updates main
deb-src http://security.debian.org/squeeze/updates main
或:
deb http://ftp.cn.debian.org/debian squeeze main non-free
deb-src http://ftp.cn.debian.org/debiansqueeze main non-free
deb http://ftp.cn.debian.org/debiansqueeze-updates main non-free
deb-src http://ftp.cn.debian.org/debiansqueeze-updates main non-free
debhttp://mirrors.ustc.edu.cn/debian-security/ squeeze/updates main non-free
deb-srchttp://mirrors.ustc.edu.cn/debian-security/ squeeze/updates main non-free
(2)wheezy版本
deb http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy main contrib non-free
deb http://ftp.cn.debian.org/debian/ wheezy-proposed-updates main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy-proposed-updates main contrib non-free
deb http://ftp.cn.debian.org/debian/ wheezy-backports main contrib non-free
deb-src http://ftp.cn.debian.org/debian/ wheezy-backports main contrib non-free

版权声明:
作者:admin
链接:https://www.bttme.com/archives/655.html
来源:bttme
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>