apt-get无法使用
来源:互联网 发布:普华永道待遇 知乎 编辑:程序博客网 时间:2024/06/07 09:38
使用虚拟机安装Ubuntu14.04后使用apt-get 装软件提示unable locate package,网上有的说apt-get update一下就好了,还有的说要删除一些文件,但是尝试后没用,需编辑/etc/apt/source_list将源修改。首先cp /etc/apt/source_list /etc/apt/source_list.bak进行备份,然后将原来文件内容替换为以下国内的源,速度也很不错,我使用了官方源。在更改了源后,能使用apt-cache search了,但是还是不能进行安装,再次百度后,发现将以下的源放在原有的源的前面,在重新进行更新以下就行了。
官方源:
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
163源:
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
阿里源:
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
centos源(放心使用):
deb http://centos.bitcomm.cn/ubuntu trusty main restricted universe multiverse
deb http://centos.bitcomm.cn/ubuntu trusty-security main restricted universe multiverse
deb http://centos.bitcomm.cn/ubuntu trusty-updates main restricted universe multiverse
deb http://centos.bitcomm.cn/ubuntu trusty-backports main restricted universe multiverse
deb http://centos.bitcomm.cn/ubuntu trusty-proposed main restricted universe multiverse
deb-src http://centos.bitcomm.cn/ubuntu trusty main restricted universe multiverse
deb-src http://centos.bitcomm.cn/ubuntu trusty-security main restricted universe multiverse
deb-src http://centos.bitcomm.cn/ubuntu trusty-updates main restricted universe multiverse
deb-src http://centos.bitcomm.cn/ubuntu trusty-backports main restricted universe multiverse
deb-src http://centos.bitcomm.cn/ubuntu trusty-proposed main restricted universe multiverse
搜狐源:
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
然后执行apt-get update就行了!
- apt-get无法使用
- debian 无法使用apt-get解决办法
- Ubuntu中vim无法使用 提示:apt-get install时
- ubuntu中apt-get install 无法使用的解决办法
- ubuntu12.04无法使用apt-get install问题
- apt-get使用代理
- apt-get 使用代理
- apt-get 的使用
- apt-get使用
- apt-get 使用详解
- apt-get 使用详解
- apt-get 使用详解
- apt-get 使用详解
- apt-get 使用详解
- apt-get 使用详解
- apt-get 使用详解
- apt-get使用介绍
- apt-get 使用详解
- c++ stl容器vector删除(erase),遍历等基本用法介绍及头文件
- SAX解析xml基础
- Android中ContentProvider组件详解
- 在win7 64位系统下安装Flask
- JS设计模式之享元模式
- apt-get无法使用
- Dubbo与Zookeeper、Spring整合使用
- JAVA实现XML-RPC客户端和服务端
- c++ stl栈容器stack的pop(),push()等用法介绍及头文件
- iOS 好的学习链接地址
- Android应用层View绘制流程与源码分析
- 【持久化框架】Mybatis与Hibernate的对比
- 远程通信的几种选择(RPC,Webservice,RMI,JMS的区别)
- 并行 并发问题