Linux安装vim失败的解决办法
最近想了解一下linux编程,于是linux系统下输入vim,发现竟然没有安装。好吧,那就安装吧。命令:
sudo apt-get install vim
百度百科:apt-get是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索、安装、升级、卸载软件或操作系统。
系统报错,如下图:

网上查了下资料说是先执行update:
sudo apt-get update
系统报错,如下:
E: Some index files failed to download, they have been ignored, or old ones used instead.
于是乎再次查找问题,发现不支持老版本ubuntu了,我的系统版本是11.10。在不安装12+以上的版本情况下,有一个解决办法,更新/etc/apt/sources.list。
sudo add-apt-repository "deb http://old-releases.ubuntu.com/ubuntu maverick main restricted universe"
这个命令是向sources.list文件追加引号里的内容,然后执行update
发现结果中有类似http://old-releases.ubuntu.com/……的行。抱着试试看的态度,执行安装vim,成功!
小总结:
/etc/apt/sources.list 这个文件存储源信息。
deb http://cn.archive.ubuntu.com/ubuntu/ precise main restricted
这句话到底怎么解释,对应着服务器上的什么目录呢? 对应的是:
http://cn.archive.ubuntu.com/ubuntu/dists/precise/main
http://cn.archive.ubuntu.com/ubuntu/dists/precise/restricted
也就是说,解析规则是这样的 :
uri + "dists" + 版本信息 + 若干个分类
注:更新完sources.list文件后,执行update继续报错是因为该文件中有无效的目录,可以删除或者忽略。
Linux安装vim失败的解决办法的更多相关文章
- npm install 错误 安装 chromedriver 失败的解决办法
npm 安装 chromedriver 失败的解决办法npm 安装 chromedriver 时,偶尔会出错,错误提示类似于:npm ERR! chromedriver@2.35.0 install: ...
- Ubuntu下sudo apt-get install vim 失败的解决办法
Ubuntu下 执行命令:sudo apt-get install vim 失败 解决办法: 更新一下,命令:sudo apt-get update 再安装即可成功:sudo apt-get inst ...
- vs2010用NuGet(程序包管理)安装EF失败之解决办法
今天用程序包管理控制台安装EF.报错.如下
- Python爬虫html解析工具beautifulSoup在pycharm中安装及失败的解决办法
1.安装步骤: 首先,你要先进入pycharm的Project Interpreter界面,进入方法是:setting(ctrl+alt+s) ->Project Interpreter,Pro ...
- [转]Python爬虫html解析工具beautifulSoup在pycharm中安装及失败的解决办法
原文地址:https://www.cnblogs.com/yysbolg/p/9040649.html 刚开始学习一门技术最麻烦的问题就是搞定IDE环境,直接在PyCharm里安装BeautifulS ...
- Eclipse安装PyDev失败的解决办法
在Eclipse上安装Pydev,首先尝试了三种方法,均失败. Eclipse版本号如下: 尝试的方法 第一种: 菜单栏Help>Install New Software,输入网址, http: ...
- PandorBox 中安装aria2失败的解决办法
来自:http://www.right.com.cn/forum/thread-174358-1-1.html 不论luci界面还是opkg中安装,都提示缺少依赖包uclibc,pandorabox默 ...
- npm 安装 chromedriver 失败的解决办法
https://segmentfault.com/a/1190000008310875 npm install chromedriver --chromedriver_cdnurl=http://cd ...
- npm 安装 sass-loader 失败的解决办法
You got to add python to your PATH variable. One thing you can do is Edit your Path variable now and ...
随机推荐
- POJ 2823 Sliding Window 题解
POJ 2823 Sliding Window 题解 Description An array of size n ≤ 106 is given to you. There is a sliding ...
- Fedora 23 配置
Linux下安装Fedora 刻到u盘上 下好iso后准备刻录到u盘...可是查了一下只能在用一个叫dd的东西刻= =于是学了下...然而就是一句话: dd if=/path/xxx.iso of=/ ...
- 【HDU】1850 Being a Good Boy in Spring Festival
http://acm.hdu.edu.cn/showproblem.php?pid=1850 题意:同nim...顺便求方案数... #include <cstdio> #include ...
- 求1+2+……+n(位运算)
求1+2+3+...+n,要求不能使用乘除法.for.while.if.else.switch.case等关键字及条件判断语句(A?B:C). 我发现网上的做法都很神,各种理由编译的巧妙办法,就能间接 ...
- NHibernate one-to-one
NHibernate里面one-to-one有两种方式:主键关联和唯一外健关联 主键关联: 两个表拥有相同的主键字段,值相同的关联在一起.典型的应用是一个对象的属性太多,将常用的属性跟不常用的附加属性 ...
- 纪念逝去的岁月——C/C++交换排序
交换排序 代码 #include <stdio.h> void printList(int iList[], int iLen) { ; ; i < iLen; i++) { pri ...
- 用CSS设置Table的细边框的最好用的方法
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- android中versionCode&versionName
原文来自:http://blog.csdn.net/wh_19910525/article/details/8660416 ,略有修改 一.概述 Android的版本可以在androidmainfes ...
- [LintCode] Paint House II 粉刷房子之二
There are a row of n houses, each house can be painted with one of the k colors. The cost of paintin ...
- [LintCode] Flatten Nested List Iterator 压平嵌套链表迭代器
Given a nested list of integers, implement an iterator to flatten it. Each element is either an inte ...