centos7 bash: vim: command not found
原创    echojava    发表于:2018-05-28 17:00:39
  阅读 :94   收藏   编辑

系统默认没有安装vim,只有vi

执行命令:

yum install vim

等待执行完即可:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.shu.edu.cn
 * updates: mirrors.shu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.160-4.el7 will be installed
--> Processing Dependency: vim-common = 2:7.4.160-4.el7 for package: 2:vim-enhanced-7.4.160-4.el7.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.160-4.el7.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be installed
---> Package vim-common.x86_64 2:7.4.160-4.el7 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.160-4.el7.x86_64
--> Running transaction check
---> Package vim-filesystem.x86_64 2:7.4.160-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================
 Package                              Arch                         Version                                 Repository                  Size
============================================================================================================================================
Installing:
 vim-enhanced                         x86_64                       2:7.4.160-4.el7                         base                       1.0 M
Installing for dependencies:
 gpm-libs                             x86_64                       1.20.7-5.el7                            base                        32 k
 vim-common                           x86_64                       2:7.4.160-4.el7                         base                       5.9 M
 vim-filesystem                       x86_64                       2:7.4.160-4.el7                         base                        10 k

Transaction Summary
============================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 7.0 M
Installed size: 23 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): gpm-libs-1.20.7-5.el7.x86_64.rpm                                                                              |  32 kB  00:00:05     
(2/4): vim-filesystem-7.4.160-4.el7.x86_64.rpm                                                                       |  10 kB  00:00:05     
(3/4): vim-enhanced-7.4.160-4.el7.x86_64.rpm                                                                         | 1.0 MB  00:00:06     
(4/4): vim-common-7.4.160-4.el7.x86_64.rpm                                                                           | 5.9 MB  00:00:45     
--------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                       156 kB/s | 7.0 MB  00:00:45     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gpm-libs-1.20.7-5.el7.x86_64                                                                                             1/4 
  Installing : 2:vim-filesystem-7.4.160-4.el7.x86_64                                                                                    2/4 
  Installing : 2:vim-common-7.4.160-4.el7.x86_64                                                                                        3/4 
  Installing : 2:vim-enhanced-7.4.160-4.el7.x86_64                                                                                      4/4 
  Verifying  : 2:vim-common-7.4.160-4.el7.x86_64                                                                                        1/4 
  Verifying  : 2:vim-filesystem-7.4.160-4.el7.x86_64                                                                                    2/4 
  Verifying  : gpm-libs-1.20.7-5.el7.x86_64                                                                                             3/4 
  Verifying  : 2:vim-enhanced-7.4.160-4.el7.x86_64                                                                                      4/4 

Installed:
  vim-enhanced.x86_64 2:7.4.160-4.el7                                                                                                       

Dependency Installed:
  gpm-libs.x86_64 0:1.20.7-5.el7             vim-common.x86_64 2:7.4.160-4.el7             vim-filesystem.x86_64 2:7.4.160-4.el7            

Complete!


评论
条评论

推荐阅读