gpt4 book ai didi

python -/usr/lib/x86_64-linux-gnu/libstdc++.so.6 : version `GLIBCXX_3.4.21' not found required by TensorFlow

转载 作者:行者123 更新时间:2023-12-04 02:51:05 26 4
gpt4 key购买 nike

我正在尝试部署 flask 上的应用程序debian 服务器使用机器学习库,到目前为止,我使用大多数 ML 库都做到了这一点,但由于 我得到了这个错误TensorFlow 我对此进行了大量研究,但没有对我有用的解决方案。

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

ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /flask/wstest/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so) Mar 01 15:32:11 django gunicorn[8803]: Failed to load the native TensorFlow runtime.



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

尝试过此修复程序 add-apt-repository ppa:ubuntu-toolchain-r/test给出了这个:
result of the toolchain add attempt

尝试 apt-get 更新,得到这个

W: Failed to fetch 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 版本。

最佳答案

这是 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

关于python -/usr/lib/x86_64-linux-gnu/libstdc++.so.6 : version `GLIBCXX_3.4.21' not found required by TensorFlow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54948216/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com