【转】ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package
问题:
VMware虚拟机安装了ubuntu 11.04,在使用apt-get安装软件时一直提示E:Unable to locate package。
百度了原因,说是要更新源,使用命令:sudo apt-get update更新了,但更新之后问题还是存在;
解决方案:
主要还是源的问题,目前网上找的很多源都是很久以前的了,很多的可能都不能用了; 然后自己重新下载了一个ubuntu 14.04版本的源替换原来的sources.list文件,然后运行sudo apt-get update更新后就可以安装软件了。
更新源地址(这是Ubuntu 14.04的/etc/apt/source.list文件的内容):
#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
修改Ubuntu系统源的方法:
1、更源的保存文件的权限,在终端中执行下面的命令:
chmod 777 /etc/apt/sources.list
2、打开源文件
在终端中执行下面的命令:
gedit /etc/apt/sources.list
喜欢vi的朋友可以用下面的命令:
vi /etc/apt/sources.list
3、把上面给出的Ubuntu 14.04的源复制到sources.list文件中保存退出,其中以 # 号开头的表示注释,可以一起复制,不会出错。
4、在终端中执行下面的命令:
sudo apt-get update
5、关于添加源后Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit.*****错误的解决办法:
a、在终端中输入命令: vi apt.conf
b、然后加入如下内容 :
APT
{
Cache-Limit 67108864;
};
c、保存退出,再次apt-get update,问题应该就可以解决了,若是你添加的源更多,可能还会报错,那么可以再把67108864这个数值改大,
主要原因是默认的缓存不够,需要手动设置apt.conf 文件, 在这里设置了64mb
注:若是没有apt.conf,那么就需要新建apt.conf文件,新建文件之后再执行以上操作。
本文转自:
http://www.itnose.net/detail/6116378.html
http://jingyan.baidu.com/article/f54ae2fcc881881e93b84967.html
【转】ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package的更多相关文章
- unbuntu 安装python包提示E: Unable to locate package python-timeout
今天本想着在unbuntu环境下安装python的一个包,安装了几次都提示 E: Unable to locate package python-timeout 查阅了一些信息才知道,原来是一些软件源 ...
- Ubuntu中用sudo apt-get install makeinfo时,出错:Unable to locate package
背景: 在准备ARM交叉编译环境时,执行命令: DISTRO=fsl-imx-x11 MACHINE=imx6qsabresd source fsl-setup-release.sh -b build ...
- Linux - 解决使用 apt-get 安装 yum 的时耗报 E: Unable to locate package yum 的错误
问题背景 在 Linux 系统下使用 apt-get 命令安装 yum 库报错 apt-get install yum E: Unable to locate package yum 问题解决 一行命 ...
- yum安装软件时,提示No package netstat available.的解决方法
1. 序言 如笔者在本机上运行netstat时,提示没有这个命令,向来简单粗暴,直接yum -y install netstat,显然是不能正常安装的. [root@hadoop-103 ~]# yu ...
- Ubuntu 16.04通过APT源安装QUEM虚拟机调试Linux内核
安装: sudo apt-add-repository main sudo apt-get update sudo apt-get install qemu-kvm qemu virt-manager ...
- Ubuntu 11.04 LAMP+JSP环境安装过程
安装LAMP命令:sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysq ...
- Manifest.xml中删除了『存储/修改删除SD卡中的内容』和『手机通话/读取手机状态和身份』权限,但生成apk安装软件时仍提示 允许应用程序了解或使用这两个权限
原因:Android系统会给targetSdk版本为“4”以下的应用自动分配WRITE_EXTERNAL_STORAGE 和 READ_PHONE_STATE 权限. 解放办法:在manifest.x ...
- Mac安装软件时,提示文件已损坏,需要移动到废纸篓的解决方法
1.修改系统偏好设置,安全性与隐私-->将“允许从以下位置下载的应用” ☑️任何来源. 2. mac10.12以上的系统一般没有“任何来源”这个选项,需打开terminnal终端,输入 sudo ...
- 安装qt5.3.2后,qtcreator在ubuntu 11.04无法启动的问题
在官方网站下载.run文件安装后,qtcreator启动失败,然后找到命令行启动,失败原因如下: shr@shr-Sieyuan:~/Qt5.3.2/Tools/QtCreator/bin$ ./qt ...
随机推荐
- 机器学习笔记(4)Logistic回归
模型介绍 对于分类问题,其得到的结果值是离散的,所以通常情况下,不适合使用线性回归方法进行模拟. 所以提出Logistic回归模型. 其假设函数如下: \[ h_θ(x)=g(θ^Tx) \] 函数g ...
- BETA阶段第一天
1.提供当天站立式会议照片一张 2.每个人的工作 今天完成工作 林一心 服务器调试 张杭镖 数据库调整 赵意 前端设计 江鹭涛 前端设计 3.发布项目燃尽图 4.每日每人总结 林一心:服务器端的配置不 ...
- Android 8悬浮窗适配
背景 APP推出时,提示是退出还是更改账号,这个提示框是系统级别的.然而我的Android 9 会崩溃,宁外一个小伙伴Android 7运行理想.报错提示permission denied for w ...
- 如何解决Unsupported Architecture. Your executable contains unsupported architecture '[x86_64, i386]
APP改版测试后准备Archive发布时,结果居然出现题目中的错误提示.查了一下,如果archive的时候没有选[iOS](http://lib.csdn.net/base/ios) Devices ...
- PAT L1-015 跟奥巴马一起画方块
https://pintia.cn/problem-sets/994805046380707840/problems/994805124398956544 美国总统奥巴马不仅呼吁所有人都学习编程,甚至 ...
- LR之Java Vuser II
最近项目待压测的服务端协议使用的是java的Netty框架开发,而传输的业务数据使用了google protobuf进行序列化,然后通过tcp数据流与客户端通讯.这一次的压测脚本决定使用LR的java ...
- 【php】set_include_path和get_include_path用法详解
目的:在框架中方便加载文件 参考:http://blog.sina.com.cn/s/blog_4ce89f200100twbl.html 如果我们没有设置这个值,可能我们需要写一些完全的路径: ...
- Git回滚merge操作
执行完merge操作后,没有修改代码 1.命令 ⑴ git reflog 查看merge操作的上一个提交记录的版本号 ⑵ git reset –hard 版本号 这样可以回滚到merge之前的状态 2 ...
- CodeForces - 955B(用char会超时。。。)
#include <bits/stdc++.h> #define mem(a, b) memset(a, b, sizeof(a)) using namespace std; , INF ...
- TCP的拥塞控制 (二)
TCP Reno TCP Reno引入了ssthresh(Slow Start threshold)变量,作为TCP的Slow Start和Congestion Avoidance两个阶段的分界线. ...