Unable to locate package vim 的解决方案---docker 镜像下安装Vim

本文是在查阅作者mameng1998的博客后根据他的博客所操作记录

1、问题描述

apt-get  install vi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vi


2、先进行apt-get update 然后apt-get install -y vim

root@ryan-virtual-machine:/usr/esmm/xdl-algorithm-solution/ESMM/script# apt-get update
Hit:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease                
Hit:3 http://mirrors.aliyun.com/ubuntu xenial-security InRelease               
Reading package lists... Done  
root@ryan-virtual-machine:/usr/esmm/xdl-algorithm-solution/ESMM/script#  apt-get install -y vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgpm2 libpython3.5 libpython3.5-minimal libpython3.5-stdlib python3.5
  python3.5-minimal vim-common vim-runtime
Suggested packages:
  gpm python3.5-venv python3.5-doc binfmt-support ctags vim-doc vim-scripts
  vim-gnome-py2 | vim-gtk-py2 | vim-gtk3-py2 | vim-athena-py2 | vim-nox-py2
The following NEW packages will be installed:
  libgpm2 libpython3.5 vim vim-common vim-runtime
The following packages will be upgraded:
  libpython3.5-minimal libpython3.5-stdlib python3.5 python3.5-minimal
4 upgraded, 5 newly installed, 0 to remove and 143 not upgraded.
Need to get 12.1 MB of archives.
After this operation, 35.0 MB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 python3.5 amd64 3.5.2-2ubuntu0~16.04.11 [165 kB]
Get:2 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 libpython3.5-stdlib amd64 3.5.2-2ubuntu0~16.04.11 [2132 kB]
Get:3 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 python3.5-minimal amd64 3.5.2-2ubuntu0~16.04.11 [1597 kB]
Get:4 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 libpython3.5-minimal amd64 3.5.2-2ubuntu0~16.04.11 [525 kB]
Get:5 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libgpm2 amd64 1.20.4-6.1 [16.5 kB]
Get:6 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.4 [103 kB]
Get:7 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 libpython3.5 amd64 3.5.2-2ubuntu0~16.04.11 [1360 kB]
Get:8 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.4 [5169 kB]
Get:9 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 vim amd64 2:7.4.1689-3ubuntu1.4 [1036 kB]
Fetched 12.1 MB in 24s (491 kB/s)                                              
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 23859 files and directories currently installed.)
Preparing to unpack .../python3.5_3.5.2-2ubuntu0~16.04.11_amd64.deb ...
Unpacking python3.5 (3.5.2-2ubuntu0~16.04.11) over (3.5.2-2ubuntu0~16.04.5) ...
Preparing to unpack .../libpython3.5-stdlib_3.5.2-2ubuntu0~16.04.11_amd64.deb ...
Unpacking libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.11) over (3.5.2-2ubuntu0~16.04.5) ...
Preparing to unpack .../python3.5-minimal_3.5.2-2ubuntu0~16.04.11_amd64.deb ...
Unpacking python3.5-minimal (3.5.2-2ubuntu0~16.04.11) over (3.5.2-2ubuntu0~16.04.5) ...
Preparing to unpack .../libpython3.5-minimal_3.5.2-2ubuntu0~16.04.11_amd64.deb ...
Unpacking libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.11) over (3.5.2-2ubuntu0~16.04.5) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../libgpm2_1.20.4-6.1_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.4-6.1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../vim-common_2%3a7.4.1689-3ubuntu1.4_amd64.deb ...
Unpacking vim-common (2:7.4.1689-3ubuntu1.4) ...
Selecting previously unselected package libpython3.5:amd64.
Preparing to unpack .../libpython3.5_3.5.2-2ubuntu0~16.04.11_amd64.deb ...
Unpacking libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.11) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a7.4.1689-3ubuntu1.4_all.deb ...
Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:7.4.1689-3ubuntu1.4) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a7.4.1689-3ubuntu1.4_amd64.deb ...
Unpacking vim (2:7.4.1689-3ubuntu1.4) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.11) ...
Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.11) ...
Setting up libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.11) ...
Setting up python3.5 (3.5.2-2ubuntu0~16.04.11) ...
Setting up libgpm2:amd64 (1.20.4-6.1) ...
Setting up vim-common (2:7.4.1689-3ubuntu1.4) ...
Setting up libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.11) ...
Setting up vim-runtime (2:7.4.1689-3ubuntu1.4) ...
Setting up vim (2:7.4.1689-3ubuntu1.4) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu10) ...

 

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值