Ubuntu install Dlib After import appears libstdc++.so.6:version ' glibcxx_3.4.21 ' not found

Source: Internet
Author: User

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

gccwhen 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.