Solved: cannot find -lboost_system-mt.
Today we will see how to fix one of the error message i encountered while building one of the package for Nagios.
And how to fix that with the binaries installed on our server.
I. Error Details
atic-libstdc++ -L/usr/lib64 -lboost_system-mt /gcc-v9.3.0/Linux/RHEL6.0-2013-x86_64/bin/ld: cannot find -lboost_system-mt collect2: error: ld returned 1 exit status make[1]: *** [Makefile:2742: livestatus.o] Error 1 make[1]: Leaving directory '/root/nagios/mk-livestatus-1.5.0p23/src' make: *** [Makefile:406: install-recursive] Error 1
II. Solution
a. Check if the RPM is installed and the alternative file is available.
[root@ngelinux01 ~]# rpm -ql boost-devel | grep -i system | grep -i libboost /usr/lib64/libboost_filesystem.so /usr/lib64/libboost_system.so [root@ngelinux01 ~]#
b. If available, create a link and then the build process will take this alternative binary.
[root@ngelinux01 ~]# ln -s /usr/lib64/libboost_system.so /usr/lib64/libboost_system-mt.so [root@ngelinux01 ~]#
Now build the package again, and it will be successful.