最近想了解一下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失败的解决办法的更多相关文章

  1. npm install 错误 安装 chromedriver 失败的解决办法

    npm 安装 chromedriver 失败的解决办法npm 安装 chromedriver 时,偶尔会出错,错误提示类似于:npm ERR! chromedriver@2.35.0 install: ...

  2. Ubuntu下sudo apt-get install vim 失败的解决办法

    Ubuntu下 执行命令:sudo apt-get install vim 失败 解决办法: 更新一下,命令:sudo apt-get update 再安装即可成功:sudo apt-get inst ...

  3. vs2010用NuGet(程序包管理)安装EF失败之解决办法

    今天用程序包管理控制台安装EF.报错.如下

  4. Python爬虫html解析工具beautifulSoup在pycharm中安装及失败的解决办法

    1.安装步骤: 首先,你要先进入pycharm的Project Interpreter界面,进入方法是:setting(ctrl+alt+s) ->Project Interpreter,Pro ...

  5. [转]Python爬虫html解析工具beautifulSoup在pycharm中安装及失败的解决办法

    原文地址:https://www.cnblogs.com/yysbolg/p/9040649.html 刚开始学习一门技术最麻烦的问题就是搞定IDE环境,直接在PyCharm里安装BeautifulS ...

  6. Eclipse安装PyDev失败的解决办法

    在Eclipse上安装Pydev,首先尝试了三种方法,均失败. Eclipse版本号如下: 尝试的方法 第一种: 菜单栏Help>Install New Software,输入网址, http: ...

  7. PandorBox 中安装aria2失败的解决办法

    来自:http://www.right.com.cn/forum/thread-174358-1-1.html 不论luci界面还是opkg中安装,都提示缺少依赖包uclibc,pandorabox默 ...

  8. npm 安装 chromedriver 失败的解决办法

    https://segmentfault.com/a/1190000008310875 npm install chromedriver --chromedriver_cdnurl=http://cd ...

  9. npm 安装 sass-loader 失败的解决办法

    You got to add python to your PATH variable. One thing you can do is Edit your Path variable now and ...

随机推荐

  1. 【HDU】3516 Tree Construction

    http://acm.hdu.edu.cn/showproblem.php?pid=3516 题意:平面n个点且满足xi<xj, yi>yj, i<j.xi,yi均为整数.求一棵树边 ...

  2. 纪念逝去的岁月——C++实现一个栈

    1.代码 2.运行结果 1.代码 stack.cpp #include <stdio.h> #include <string.h> class ClsStack { priva ...

  3. Oracle数据库合并行记录,WMSYS.WM_CONCAT 函數的用法

    Sql代码 select t.rank, t.Name from t_menu_item t; 10 CLARK    10 KING    10 MILLER    20 ADAMS    20 F ...

  4. 符号三角形——F

    F. 符号三角形 Time Limit: 1000ms Memory Limit: 32768KB 64-bit integer IO format:      Java class name: 符号 ...

  5. nginx“虚拟目录”不支持php的解决办法

    这几天在配置Nginx,PHP用FastCGI,想装一个phpMyAdmin管理数据库,phpMyAdmin不想放在网站根目录 下,这样不容易和网站应用混在一起,这样phpMyAdmin的目录就放在别 ...

  6. pthread_creat()解析及需注意的地方

    函数声明 int pthread_create(pthread_t*restrict tidp,const pthread_attr_t *restrict_attr,void*(*start_rtn ...

  7. concat,reverse

    1.concat 连接,拼接 <script> var arr1=[1,2,3]; var arr2=[4,5,6]; var arr3=[7,8,9]; alert(arr1.conca ...

  8. min-height

    1.min-height min-height:160px;height:auto!important;height:160px; min-height:160px; 设置对象box的最小高度,Fir ...

  9. Spring 定时器

    <!-- 对定时任务进行引用 --> <bean id="schedulerFactory" class="org.springframework.sc ...

  10. 安装配置redis

    1.1查看当前系统环境 查看当前系统版本信息: 查看当前网络连通情况: 1.2使用yum安装 1.3确认redis的安装目录 1.4查看\修改配置文件 1.5启动redis服务并验证 1.6使用tel ...