最近使用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. sae后台管理端的js,daterangepicker使用

    原本只为了日期范围选择器看下sae的前端怎么实现 然后... 公共函数两个文件,第一个是各种插件: typeahead.js 自动完成 //关键词自动完成 $('#page-auto-complete ...

  2. 压缩代码加速ecshop程序页面加载速度

    由于页面有很多图片,页面加载速度有点慢,本来打算减小图片的体积,后来想想这个后期还得测试下,所以暂时不打算使用google的图片优化工具,先把ecshop生成的html代码压缩下吧 压缩前:首页体积为 ...

  3. BinaryReader 和BinaryWriter 读写类对象

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...

  4. web design tools

    https://www.google.com/webdesigner/ http://html.adobe.com/edge/inspect/ http://www.creativebloq.com/ ...

  5. 第 3 章 单例模式【Singleton Pattern】

    以下内容出自:24种设计模式介绍与6大设计原则 这个模式是很有意思,而且比较简单,但是我还是要说因为它使用的是如此的广泛,如此的有人缘,单例就是单一.独苗的意思,那什么是独一份呢?你的思维是独一份,除 ...

  6. tesseract 字体训练资料篇

    tesseract 字体训练资料篇 1.制作.box档案文件. tesseract [lang].[fontname].exp[num].tif [lang].[fontname].exp[num] ...

  7. C# XML与对象互相转换

    using System; using System.Collections.Generic; using System.Text; using System.Xml.Serialization; u ...

  8. [BZOJ 2738] 矩阵乘法 【分块】

    题目链接:BZOJ - 2738 题目分析 题目名称 “矩阵乘法” 与题目内容没有任何关系..就像VFK的 A+B Problem 一样.. 题目大意是给定一个矩阵,有许多询问,每次询问一个子矩阵中的 ...

  9. SPRING IN ACTION 第4版笔记-第二章-004-Bean是否单例

    spring的bean默认是单例,加载容器是会被化,spring会拦截其他再次请求bean的操作,返回spring已经创建好的bean. It appears that the CompactDisc ...

  10. Oracle - Unprocessed Material

    create table kol.MTL_MATERIAL_TRANS_TMP_140325 as select * from MTL_MATERIAL_TRANSACTIONS_TEMP ; upd ...