/usr/lib/x86_64-linux-gnu/libstdc++.so.6:TensorFlow无法找到版本`GLIBCXX_3.4.21'

问题描述 投票:0回答:2

我正在尝试使用机器学习库在debian服务器上部署一个烧瓶应用程序,我到目前为止管理大多数ML库但是我得到了这个错误,感谢TensorFlow,我研究了很多关于它的没有工作解决方案。

PS:我正在为我的应用程序使用3.7 python venv

ImportError:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:找不到版本`GLIBCXX_3.4.21'(/flask/wstest/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal需要.so)Mar 01 15:32:11 django gunicorn [8803]:无法加载本机TensorFlow运行时。

我显然错过了GLIBCXX 3.4.21,因为strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXXshows 3.4.20是最新版本。

尝试这个修复add-apt-repository ppa:ubuntu-toolchain-r/test给这个:result of the toolchain add attempt

试过apt-get update,得到了这个

W:无法获取http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/jessie/main/binary-amd64/Packages 404 Not Found

还尝试更新libgcc和libstdc ++ 6,说我有最新版本。

编辑:我怀疑Debian 8 Jessie不支持比3.4.20更高的glibcxx版本。

python tensorflow debian libstdc++
2个回答
0
投票

所以,我刚刚测试了Stretch,它工作正常。这个问题与Debian 8 Jessie的操作系统有关,它无法处理比3.4.20更高版本的glibcxxx。

PS:Stretch是Debian 9的发行名称


0
投票

这是Ubuntu 16.04中针对此问题的解决方案

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
© www.soinside.com 2019 - 2024. All rights reserved.