Python /usr/lib/x86_64-linux-gnu/libstdc++;。so.6:版本'GLIBCXX_3.4.21';找不到TensorFlow所需的
我正在尝试使用机器学习库在debian服务器上部署flask应用程序,到目前为止,我在大多数ML库中都做到了这一点,但由于TensorFlow我对此进行了大量研究,但没有找到有效的解决方案,所以我出现了这个错误 PS:我的应用程序使用的是3.7PythonVenV 导入错误:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:找不到版本'GLIBCXX_3.4.21'(由/flask/wstest/lib/python3.7/site packages/tensorflow/python/_pywrap\u tensorflow\u internal.so所需) Mar 01 15:32:11 django gunicorn[8803]:未能加载本机TensorFlow运行时 我显然错过了GLIBCXX3.4.21,因为Python /usr/lib/x86_64-linux-gnu/libstdc++;。so.6:版本'GLIBCXX_3.4.21';找不到TensorFlow所需的,python,tensorflow,debian,libstdc++,Python,Tensorflow,Debian,Libstdc++,我正在尝试使用机器学习库在debian服务器上部署flask应用程序,到目前为止,我在大多数ML库中都做到了这一点,但由于TensorFlow我对此进行了大量研究,但没有找到有效的解决方案,所以我出现了这个错误 PS:我的应用程序使用的是3.7PythonVenV 导入错误:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:找不到版本'GLIBCXX_3.4.21'(由/flask/wstest/lib/python3.7/site packages/tensor
strings/usr/lib/x86_64-linux-gnu/libstdc++。因此.6 | grep GLIBCXX
将3.4.20显示为最新版本
已尝试此修复程序添加apt存储库ppa:ubuntu-toolchain-r/test
给出了:
尝试获取更新,收到此消息
W:未能获取404未找到
还试图更新libgcc和libstdc++6,说我有最新版本
编辑:我怀疑Debian 8 Jessie不支持比3.4.20版本更高的glibcxx版本。所以,我刚刚测试了Stretch,效果很好。该问题与操作系统有关。在本例中,Debian 8 Jessie,它无法处理比3.4.20更高版本的glibcxxx
PS:Stretch是Debian 9的发行名
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade libstdc++6
您可以检查是否获得如下所示的GLIBCXX所需版本:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
您正在使用TF1.13.1吗?我尝试了TF1.13.1和1.13.0,无法安装旧版本。