共享库文件缺失

共享库文件缺失

报错

Stopping keepalived:                                       [FAILED]
Starting keepalived: /export/servers/keepalived-1.2.13/sbin/keepalived: error while loading shared libraries: libnl.so.1: cannot open shared object file: No such file or directory
                                                           [FAILED]

错误提示:libnl.so.1: cannot open shared object file: No such file or directory
没有找到libnl.so.1共享库文件

我们查看命令需要的共享库有哪些

[root@vershenyangshenbei6-I172 ~]# ldd /export/servers/keepalived-1.2.13/sbin/keepalived
	linux-vdso.so.1 =>  (0x00007fff8afff000)
	libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007ff45f6cc000)
	libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007ff45f2e7000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff45f0af000)
	libnl.so.1 => not found
	libdl.so.2 => /lib64/libdl.so.2 (0x00007ff45eeab000)
	libc.so.6 => /lib64/libc.so.6 (0x00007ff45eb16000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ff45e8d2000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ff45e5eb000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ff45e3e6000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ff45e1ba000)
	libz.so.1 => /lib64/libz.so.1 (0x00007ff45dfa4000)
	libfreebl3.so => /lib64/libfreebl3.so (0x00007ff45dda0000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff45f93f000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ff45db95000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ff45d992000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff45d777000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff45d55a000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ff45d33a000)

发现libnl.so.1 not found

机器上find一下看是否有类似的文件名,只是后缀不一样,看是否能做软连接解决

find ./ -name libnl.so*

发现没有,后面搜少依赖libnl

[root@vershenyangshenbei6-I172 usr]# yum install libnl -y
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package libnl.x86_64 0:1.1.4-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================================================
 Package                                                        Arch                                                            Version                                                                 Repository                                                     Size
============================================================================================================================================================================================================================================================================
Installing:
 libnl                                                          x86_64                                                          1.1.4-2.el6                                                             base                                                          121 k

Transaction Summary
============================================================================================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 121 k
Installed size: 353 k
Downloading Packages:
libnl-1.1.4-2.el6.x86_64.rpm                                                                                                                                                                                                                         | 121 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libnl-1.1.4-2.el6.x86_64                                                                                                                                                                                                                                 1/1 
  Verifying  : libnl-1.1.4-2.el6.x86_64                                                                                                                                                                                                                                 1/1 

Installed:
  libnl.x86_64 0:1.1.4-2.el6                                                                                                                                                                                                                                                

Complete!

再次看下共享lib库发现文件找到了,发现yum安装的装到了/lib64/libnl.so.1位置

[root@vershenyangshenbei6-I172 usr]# ldd /export/servers/keepalived-1.2.13/sbin/keepalived
	linux-vdso.so.1 =>  (0x00007fff450f7000)
	libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007fa745dad000)
	libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007fa7459c8000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa745790000)
	libnl.so.1 => /lib64/libnl.so.1 (0x00007fa74553e000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa74533a000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa744fa5000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fa744d61000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fa744a7a000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fa744875000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fa744649000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fa744433000)
	libfreebl3.so => /lib64/libfreebl3.so (0x00007fa74422f000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa743fab000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa743d8e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa746020000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fa743b82000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fa74397f000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa743765000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa743545000)
posted @ 2022-09-08 09:09  SpecialSpeculator  阅读(431)  评论(0编辑  收藏  举报