问题现象
使用vim编辑文件的时候,无法进入编辑页面
[root@localhost centos]# vim Dockerfile
[root@localhost centos]#
解决办法:
1、重新安装vim,并尝试编辑文件
[root@localhost ~]# yum reinstall vim -y [root@localhost ~]# vim Dockerfile vim: error while loading shared libraries: /lib64/libgpm.so.2: file too short
2、查看库文件所属的包
[root@localhost ~]# yum provides libgpm.so.2 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com gpm-libs-1.20.7-6.el7.i686 : Dynamic library for for the gpm Repo : base Matched from: Provides : libgpm.so.2
3、重新安装对应的包
[root@localhost ~]# yum reinstall gpm-libs -y
4、再次编辑文件依然报错
[root@localhost ~]# vim Dockerfile vim: error while loading shared libraries: /usr/lib64/perl5/CORE/libperl.so: file too short
5、依然按上面的方法重新安装对应的包
[root@localhost ~]# yum reinstall perl-libs -y
6、再次尝试编辑,问题解决
[root@localhost ~]# vim Dockerfile
~
~
~