Centos6 系统下,已经安装vim的前提下。执行操作vim,出现报错

[root@localhost etc]# vim my.cnf
vim: error while loading shared libraries: /usr/lib/libgpm.so.2: file too short
[root@localhost etc]#
看图,弄了下,还是报错

wKioL1Z3ZOrzkUgEAAC7zK8C6dM730.png

执行命令:ldd /usr/bin/vim

执行结果:

        linux-vdso.so.1 =>  (0x00007fffaedff000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fcd1ec69000)
        libncurses.so.5 => /lib64/libncurses.so.5 (0x00007fcd1ea46000)
        libacl.so.1 => /lib64/libacl.so.1 (0x00007fcd1e83e000)
        libgpm.so.2 => not found
        libperl.so => /usr/lib64/perl5/CORE/libperl.so (0x00007fcd1e2cc000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fcd1e0b2000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007fcd1deaf000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fcd1db1a000)
        libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007fcd1d774000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fcd1d4f0000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fcd1d2eb000)
        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fcd1d0ca000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcd1cead000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fcd1ee91000)
        libattr.so.1 => /lib64/libattr.so.1 (0x00007fcd1cca7000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fcd1ca8e000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fcd1c857000)
        libfreebl3.so => /lib64/libfreebl3.so (0x00007fcd1c5df000)


解决办法:直接安装gpm和gpm-devel包

执行命令:yum install gpm gpm-devel -y

wKiom1Z3ZTKBj6SVAACYKXe16zc505.png

 

如果出现以上画面表示安装成功!

再次执行跟踪:

执行命令:ldd /usr/bin/vim

wKioL1Z3ZX6AuBIIAAC0pHk9Om4266.png

 

到此问题就已经解决!

 

 

 

 

你可能感兴趣的:(centos,vim, )