vim: error while loading shared libraries: /lib64/libgpm.so.2: file too short解决过程

声明:本篇博客只是把解决该问题的过程记录出来。

在使用vim的时候突然报错:

[root@localhost ~]# vim a
vim: error while loading shared libraries: /lib64/libgpm.so.2: file too short

解决过程如下:

1、先搜索了一下该软件是哪个包提供的

[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
epel/x86_64/filelists                                               |  10 MB  00:00:00
gpm-libs-1.20.7-5.el7.i686 : Dynamic library for for the gpm
Repo        : base
Matched from:
Provides    : libgpm.so.2
Filename    : /usr/lib/libgpm.so.2



gpm-libs-1.20.7-5.el7.x86_64 : Dynamic library for for the gpm
Repo        : base
Matched from:
Filename    : /usr/lib64/libgpm.so.2



gpm-libs-1.20.7-5.el7.x86_64 : Dynamic library for for the gpm
Repo        : @/
Matched from:
Filename    : /usr/lib64/libgpm.so.2

2、将该软件包重新安装了一下

[root@localhost ~]# yum reinstall -y gpm-libs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package              Arch               Version                    Repository        Size
===========================================================================================
Reinstalling:
 gpm-libs             x86_64             1.20.7-5.el7               base              32 k

Transaction Summary
===========================================================================================
Reinstall  1 Package

Total download size: 32 k
Installed size: 27 k
Downloading packages:
gpm-libs-1.20.7-5.el7.x86_64.rpm                                    |  32 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gpm-libs-1.20.7-5.el7.x86_64                                            1/1
  Verifying  : gpm-libs-1.20.7-5.el7.x86_64                                            1/1

Installed:
  gpm-libs.x86_64 0:1.20.7-5.el7

Complete!

3、再使用vim的时候又出现了另外一个问题

[root@localhost ~]# vim a
vim: error while loading shared libraries: /usr/lib64/perl5/CORE/libperl.so: file too short

4、将提供该文件的包也重新安装了一下

[root@localhost ~]# yum reinstall -y perl-libs

5、更新yum仓库

[root@localhost ~]# yum update

6、生成缓存

[root@localhost ~]# yum makecache

7、先卸载vim,然后重新安装vim

[root@localhost ~]# yum remove -y vim*
[root@localhost ~]# yum install -y vim*

8、之后可以正常使用

 

你可能感兴趣的:(linux)