vim: error while loading shared libraries: libperl.so

早上习惯性的敲了一下 pacman -Syy && pacman -Syu,转身去 vim 文件的时候就报错了

$ vim
vim: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory

ldd 一下,瞅瞅是什么情况

$ ldd /usr/local/bin/vim
    linux-vdso.so.1 (0x00007ffd32393000)
    libSM.so.6 => /usr/lib/libSM.so.6 (0x00007fae0d580000)
    libICE.so.6 => /usr/lib/libICE.so.6 (0x00007fae0d563000)
    libXt.so.6 => /usr/lib/libXt.so.6 (0x00007fae0d4f8000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fae0d3b7000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007fae0d272000)
    libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fae0d201000)
    libacl.so.1 => /usr/lib/libacl.so.1 (0x00007fae0d1f4000)
    libgpm.so.2 => /usr/lib/libgpm.so.2 (0x00007fae0d1ec000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fae0d1e6000)
    libperl.so => not found
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fae0d1c4000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007fae0cffd000)
    libutil.so.1 => /usr/lib/libutil.so.1 (0x00007fae0cff6000)
    libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007fae0cfed000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fae0cfc3000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fae0dc82000)
    libattr.so.1 => /usr/lib/libattr.so.1 (0x00007fae0cfbc000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fae0cfb7000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fae0cfad000)

确实,libperl.so => not found,查一下这个库升级到哪个位置去了,用新的位置做个链接。

$ pacman -F libperl.so
core/perl 5.32.0-1 [installed]
    usr/lib/perl5/5.32/core_perl/CORE/libperl.so
# jiaozhu @ jiaozhublog in /usr/local/nginx/conf [1:46:29] 
$ sudo ln -s /usr/lib/perl5/5.32/core_perl/CORE/libperl.so /usr/lib/libperl.so

OK,再次 vim 就正常了。

添加新评论