|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!用centos的主机的r候,用vim时呈现-bash:vim:commandnotfound.只能利用vi.那末怎样安bvim呢?
输出rpm-qa|grepvim下令,假如vim已准确装置,会前往上面的三行代码:
[root@centos]#rpm-qa|grepvim
vim-minimal-7.0.109-6.el5
vim-common-7.0.109-7.2.el5
vim-enhanced-7.0.109-7.2.el5
假如少了个中的某一条,好比vim-enhanced的,就用下令yum-yinstallvim-enhanced来装置:
yum-yinstallvim-enhanced
假如下面的三条都]有前往,能够间接用yum-yinstallvim*下令
yum-yinstallvim*
二。
[root@localhost~]#ll
#局部省略了......
-rwxr--r--1rootroot34Apr2612:48test.txt
#用vim翻开test.txt文件
[root@localhost~]#vimtest.txt
-bash:vim:commandnotfound
[root@localhost~]#
#利用下令查询
[root@localhost~]#rpm-qa|grepvim
vim-minimal-7.0.109-6.el5
#发明只要这个包,申明没装置完全,必要从头装置vim
#上面是装置历程
[root@localhost~]#yuminstall-yvim*
Loadedplugins:fastestmirror
Loadingmirrorspeedsfromcachedhostfile
*addons:mirrors.grandcloud.cn
*base:mirrors.grandcloud.cn
*extras:mirrors.grandcloud.cn
*updates:mirrors.grandcloud.cn
SettingupInstallProcess
ResolvingDependencies
-->Runningtransactioncheck
--->Packagevim-X11.x86_642:7.0.109-7.2.el5settobeupdated
--->Packagevim-common.x86_642:7.0.109-7.2.el5settobeupdated
--->Packagevim-enhanced.x86_642:7.0.109-7.2.el5settobeupdated
--->Packagevim-minimal.x86_642:7.0.109-7.2.el5settobeupdated
-->FinishedDependencyResolution
DependenciesResolved
========================================================================================
PackageArchVersionRepositorySize
========================================================================================
Installing:
vim-X11x86_642:7.0.109-7.2.el5base1.0M
vim-commonx86_642:7.0.109-7.2.el5base6.4M
vim-enhancedx86_642:7.0.109-7.2.el5base1.3M
Updating:
vim-minimalx86_642:7.0.109-7.2.el5base334k
TransactionSummary
========================================================================================
Install3Package(s)
Upgrade1Package(s)
Totaldownloadsize:9.1M
DownloadingPackages:
(1/4):vim-minimal-7.0.109-7.2.el5.x86_64.rpm|334kB00:00
(2/4):vim-X11-7.0.109-7.2.el5.x86_64.rpm|1.0MB00:03
(3/4):vim-enhanced-7.0.109-7.2.el5.x86_64.rpm|1.3MB00:03
(4/4):vim-common-7.0.109-7.2.el5.x86_64.rpm|6.4MB00:21
----------------------------------------------------------------------------------------
Total314kB/s|9.1MB00:29
Runningrpm_check_debug
RunningTransactionTest
FinishedTransactionTest
TransactionTestSucceeded
RunningTransaction
Installing:vim-common1/5
Installing:vim-X112/5
Updating:vim-minimal3/5
Installing:vim-enhanced4/5
Cleanup:vim-minimal5/5
Installed:
vim-X11.x86_642:7.0.109-7.2.el5vim-common.x86_642:7.0.109-7.2.el5
vim-enhanced.x86_642:7.0.109-7.2.el5
Updated:
vim-minimal.x86_642:7.0.109-7.2.el5
Complete!
#装置乐成
[root@localhost~]#
[root@localhost~]#vimtest.txt
#进进vim操纵界面
#:q加入界面后,利用下令检察
[root@localhost~]#rpm-qa|grepvim
vim-enhanced-7.0.109-7.2.el5
vim-common-7.0.109-7.2.el5
vim-X11-7.0.109-7.2.el5
vim-minimal-7.0.109-7.2.el5
欢迎大家来到仓酷云论坛! |
|