报错
(py39) test@test:~/code/Face/test_speed$ python face_yaw_pitc_roll.py
Traceback (most recent call last):
File "/home/test/code/Face/test_speed/face_yaw_pitc_roll.py", line 17, in <module>
import dlib
File "/home/test/anaconda3/envs/py39/lib/python3.9/site-packages/dlib/__init__.py", line 19, in <module>
from _dlib_pybind11 import *
ImportError: /home/test/anaconda3/envs/py39/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/test/anaconda3/envs/py39/lib/python3.9/site-packages/_dlib_pybind11.cpython-39-x86_64-linux-gnu.so)
(py39) test@test:~/code/Face/test_speed$
当前的虚拟环境缺少这个包
(py39) test@test:~/code/Face/test_speed$ strings /home/test/anaconda3/envs/py39/bin/../lib/libstdc++.so.6 | grep GLIBCXX_3.4.2
GLIBCXX_3.4.2
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.21
GLIBCXX_3.4.25
GLIBCXX_3.4.24
GLIBCXX_3.4.20
GLIBCXX_3.4.2
GLIBCXX_3.4.23
GLIBCXX_3.4.22
GLIBCXX_3.4.26
(py39) test@test:~/code/Face/test_speed$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_DEBUG_MESSAGE_LENGTH
(py39) test@test:~/code/Face/test_speed$
(py39) test@test:~/anaconda3/envs/py39/lib$ sudo find / -name "libstdc++.so.6.0.29"
find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/run/user/1000/doc’: Permission denied
/home/test/anaconda3/pkgs/libstdcxx-ng-11.2.0-h1234567_1/lib/libstdc++.so.6.0.29
/home/test/anaconda3/envs/ArticulatedAnimation/lib/libstdc++.so.6.0.29
/home/test/anaconda3/envs/myenv/lib/libstdc++.so.6.0.29
/home/test/anaconda3/envs/tf26/lib/libstdc++.so.6.0.29
/home/test/anaconda3/envs/GFPGAN/lib/libstdc++.so.6.0.29
/home/test/anaconda3/envs/py_video/lib/libstdc++.so.6.0.29
find: ‘/tmp/.mount_jetbraB5knIF’: Permission denied
/var/lib/docker/overlay2/7d6241fa7df3dcda4e8dc8d31b28812255fceddc054450d7b55d2e5843db0a94/diff/opt/conda/pkgs/libstdcxx-ng-11.2.0-h1234567_1/lib/libstdc++.so.6.0.29
/var/lib/docker/overlay2/7d6241fa7df3dcda4e8dc8d31b28812255fceddc054450d7b55d2e5843db0a94/diff/opt/conda/lib/libstdc++.so.6.0.29
(py39) test@test:~/anaconda3/envs/py39/lib$
加一个外链
(py39) test@test:~/anaconda3/envs/py39/lib$ ls | grep libstdc++.so.6
libstdc++.so.6
libstdc++.so.6.0.21
libstdc++.so.6.0.26
(py39) test@test:~/anaconda3/envs/py39/lib$ ll | grep libstdc++.so.6
lrwxrwxrwx 1 test test 19 5月 16 13:02 libstdc++.so -> libstdc++.so.6.0.26*
lrwxrwxrwx 1 test test 19 5月 16 13:02 libstdc++.so.6 -> libstdc++.so.6.0.26*
lrwxrwxrwx 1 test test 19 6月 15 15:37 libstdc++.so.6.0.21 -> libstdc++.so.6.0.24
-rwxrwxr-x 5 test test 13172960 6月 10 2019 libstdc++.so.6.0.26*
(py39) test@test:~/anaconda3/envs/py39/lib$ sudo cp /root/annaconda3/envs/molopt/lib/libstdc++.so.6.0.29 ./
cp: cannot stat '/root/annaconda3/envs/molopt/lib/libstdc++.so.6.0.29': No such file or directory
(py39) test@test:~/anaconda3/envs/py39/lib$ sudo cp /root/annaconda3/envs/tf26/lib/libstdc++.so.6.0.29 ./
cp: cannot stat '/root/annaconda3/envs/tf26/lib/libstdc++.so.6.0.29': No such file or directory
(py39) test@test:~/anaconda3/envs/py39/lib$ sudo cp /home/test/anaconda3/envs/myenv/lib/libstdc++.so.6.0.29 ./
(py39) test@test:~/anaconda3/envs/py39/lib$ ln -sf libstdc++.so.6.0.29 libstdc++.so.6
(py39) test@test:~/anaconda3/envs/py39/lib$ ll | grep libstdc++.so.6
lrwxrwxrwx 1 test test 19 5月 16 13:02 libstdc++.so -> libstdc++.so.6.0.26*
lrwxrwxrwx 1 test test 19 6月 15 15:50 libstdc++.so.6 -> libstdc++.so.6.0.29*
lrwxrwxrwx 1 test test 19 6月 15 15:37 libstdc++.so.6.0.21 -> libstdc++.so.6.0.24
-rwxrwxr-x 5 test test 13172960 6月 10 2019 libstdc++.so.6.0.26*
-rwxr-xr-x 1 root root 17981480 6月 15 15:50 libstdc++.so.6.0.29*
(py39) test@test:~/anaconda3/envs/py39/lib$
标签:bin,GLIBCXX,libstd,c++,3.4,so.6,test
From: https://www.cnblogs.com/liruilong/p/17483348.html