ubuntu20.04安装fastdfs遇到的问题
说明:git clone在线安装与离线安装都不成功后,选择原来可以正常运行的fastdfs服务,进行tar打包下载,再在新项目上进行解压部署。但由于打包压缩动态库的软连接
失效,所以启动出现如下报错信息,解压办法如下:
启动报错信息:
/usr/bin/fdfs_trackerd: symbol lookup error: /usr/bin/fdfs_trackerd: undefined symbol: get_base_path_from_conf_file
查看动态连接库:
root@tsingyun:/opt/fastdfs# ldd /usr/bin/fdfs_trackerd
linux-vdso.so.1 (0x00007fffb2dfd000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f060c704000)
libfastcommon.so => /lib/libfastcommon.so (0x00007f060c6a6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f060c4b4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f060c760000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f060c365000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f060c35f000)
错误的是:
tsingyun@tsingyun:~$ ll /lib/libfastcommon.so
lrwxrwxrwx 1 root root 27 6月 29 2022 /lib/libfastcommon.so #tar的libfastcommon和fastdfs,没有软连接指向
正确的是:
tsingyun@tsingyun:~$ ll /lib/libfastcommon.so
lrwxrwxrwx 1 root root 27 6月 29 2022 /lib/libfastcommon.so -> /usr/lib64/libfastcommon.so*
解决办法:
cd /lib
rm -rf libfastcommon.so
ln -s /usr/lib64/libfastcommon.so /lib/libfastcommon.so
检查:
tsingyun@tsingyun:~$ ll /lib/libfastcommon.so
lrwxrwxrwx 1 root root 27 6月 29 2022 /lib/libfastcommon.so -> /usr/lib64/libfastcommon.so*
重新启动tracker服务
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start