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]#
看图,弄了下,还是报错

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

执行命令: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

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

 

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

再次执行跟踪:

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

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

 

到此问题就已经解决!



本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/1439337369/1726708,如需转载请自行联系原作者

上一篇:Yii日志记录Logging


下一篇:【微服务】之五:轻松搞定SpringCloud微服务-调用远程组件Feign