最近使用docker 构建python3的环境:

进入容器发现 连个vi命令多没有。。。

1、安装一个呗:

apt-get 报错:
root@22f41d59e3b2:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim

2、同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,更新源。
root@22f41d59e3b2:~# apt-get update

3、安装

root@22f41d59e3b2:~# apt-get install vim

附:

阿里云源:
 
Trusty(14.04)
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
 
Quantal(12.10)
deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
 
Precise(12.04)
deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse
 
Oneiric(11.10)
deb http://mirrors.aliyun.com/ubuntu/ oneiric main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ oneiric-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ oneiric-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ oneiric main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ oneiric-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ oneiric-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ oneiric-backports main restricted universe multiverse
 
Natty(11.04)
deb http://mirrors.aliyun.com/ubuntu/ natty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ natty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ natty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ natty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ natty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ natty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ natty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ natty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ natty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ natty-backports main restricted universe multiverse

ubuntu 安装软件(apt源)的更多相关文章

  1. ubuntu安装软件的方式

    ubuntu安装软件的方式: 通常的我们能够在ubuntu软件中心和新立得软件包管理器找到自己想要的软件,直接选择就能够自己主动下载并安装到电脑中,不想要的时候随时能够再从那里面卸载.这是第一种方法, ...

  2. 阿里云Linux安装软件镜像源

    阿里云Linux安装软件镜像源 阿里云是最近新出的一个镜像源.得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源.阿里云Linux安装镜像源地址:http://mirrors.aliyun. ...

  3. Ubuntu 安装软件的命令

    Ubuntu 安装软件的命令 安装flashplayer sudo apt-get install flashplugin-installer 安装百度云客户端 软件在百度云盘里面 安装必要的开发环境 ...

  4. 解决ubuntu安装软件has install-snap change in progress错误

    解决ubuntu安装软件has install-snap change in progress错误 2018年05月06日 13:45:39 山间明月江上清风_ 阅读数:14316 标签: ubunt ...

  5. ubuntu安装软件失败,出现404错误,更新软件源

    更新源方法 备份原来的源 首先备份原来的源,用来出错后进行恢复 sudo cp /etc/apt/sources.list/etc/apt/sources.list_backup 1 如果更新源后出错 ...

  6. Debian系列Linux/Ubuntu 安装软件

    wps(http://community.wps.cn/download/) 优客天气(https://launchpad.net/indicator-china-weather/+download) ...

  7. ubuntu安装软件apt-get

    一. apt-get用法 apt 0.8.16~exp12ubuntu10.26 for i386 compiled on Aug  5 2015 19:06:21Usage: apt-get [op ...

  8. Ubuntu安装软件提示”需要安装不能信任的软件包”解决办法

    用 Ubuntu 安装输入法软件包时提示"需要安装不能信任的软件包","这个动作需要从没有授权的软件源来安装软件包",赋予权限执行仍然无法安装,上网查了一下,只 ...

  9. 关于ubuntu安装软件的问题:apt-get和dpkg区别?

    两者的区别是dpkg绕过apt包管理数据库对软件包进行操作,所以你用dpkg安装过的软件包用apt可以再安装一遍,系统不知道之前安装过了,将会覆盖之前dpkg的安装.1.dpkg是用来安装.deb文件 ...

  10. Ubuntu下创建apt源

    1. 下载所需安装文件 sudo apt-get install soft name  安装并保存安装文件 或者 sudo apt-get source soft name      只下载安装文件 ...

随机推荐

  1. data:image/png;base64是什么

    大家可能注意到了,网页上有些图片的src或css背景图片的url后面跟了一大串字符,比如: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJ ...

  2. xml技术DTD约束定义

    XML约束 在XML技术中,可以编写一个文档来约束一个xml文档的书写规范,这称之为XML约束为什么需要XML约束? class.xml <stu><面积>?人怎么会有面积元素 ...

  3. Python 集合(set)使用

    1.python的set和其他语言类似, 是一个无序不重复元素集, 基本功能包括关系测试和消除重复元素. 集合对象还支持union(联合), intersection(交), difference(差 ...

  4. javascript第二遍基础学习笔记(一)

    1.兼容xhtml方法: <script> //<![CDATA[ ... ... //]]> </script> 2.文档模式: IE5.5引入,最初包含2种:混 ...

  5. Android动画总结#补间动画(Tween Animation/View Animation) #帧动画(Frame Animation/Drawable Animation)#属性动画(PropertyAnimation)

    1.共有三种动画,英文名字多种叫法如下 第一种动画:补间动画(Tween Animation/View Animation) 四个:RotateAnimation旋转. AlphaAnimation透 ...

  6. 【技术贴】解决Program Files文件夹消失

    好久不写程序了,今天良心发现,就寻找一下自己是否安装了JDK,习惯性的去C盘的Program Files的文件夹下面去找,次奥,没有这个文件夹.好吧.是在玩我么. 于是 打开cmd 输入如下命令 AT ...

  7. 【Uvalive 2531】 The K-League (最大流-类似公平分配问题)

    [题意] 有n个队伍进行比赛,每场比赛,恰好有一支队伍取胜.一支队伍败.每个队伍需要打的比赛场数相同,给你每个队伍目前已经赢得场数和输得场数,再给你一个矩阵,第 i 行第 j 列 表示队伍 i 和队伍 ...

  8. UVA_11178_Morley's_Theorem_(计算几何基础)

    描述 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=23&pag ...

  9. WordPress 'is_serialized()'远程任意代码执行漏洞(CVE-2013-4338)

    漏洞版本: WordPress 3.6 漏洞描述: Bugtraq ID:62345 CVE ID:CVE-2013-4338 WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PH ...

  10. eclipse环境NDK问题汇总

    1. 配置NDK路径设置 可以在cygwin中通过vim修改,也可以在windows安装目录中修改 home\<你的用户名>\.bash_profile 文件中最后添加环境变量 NDK=/ ...