1 Problem description
Install the dependency package Cmake,libboost first, then install the Dlib
sudo Install CMake sudo install libboost-python-devsudoinstall dlib
Error when import dlib after installation
Importerror:/home/liaohuqiang/anaconda2/bin/. /lib/libstdc++.so. 6: Version ' Glibcxx_3. 4.21 ' Not found (required by/usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0)
2 reasons
gcc
when upgrading, the dynamic library does not replace gcc
the old version of the dynamic library
3 workaround
(1) Find the corresponding dynamic library generated by GCC upgrade
sudo Find " libstdc++.so.6* "
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
(2) Copy to the desired place, according to the error message, put the dynamic library to/home/liaohuqiang/anaconda2/lib
CP /usr/lib/x86_64-linux-gnu/libstdc++.so. 6.0. /home/liaohuqiang/anaconda2/lib
(3) Create a new soft link
rm -rf libstdc++.so. 6 Ln -S libstdc++.so. 6.0. libstdc++.so. 6
(4) View the dynamic library and discover that it has been updated to the desired version
Strings/home/liaohuqiang/anaconda2/lib/libstdc++.so. 6.0. | grep Glibcxx
Ubuntu install dlib after import appears libstdc++.so.6:version ' glibcxx_3.4.21 ' not found