ubuntu - 在带有 GPU : `GLIBCXX_3.4.20' not found 的 Ubuntu 16.04 上从源代码构建 TensorFlow

标签 ubuntu installation tensorflow anaconda bazel

我在 Ubuntu 16.04 上,正在尝试根据 this 从源代码构建具有 GPU 支持的 TensorFlow | .一切正常,直到“构建 TensorFlow”步骤,我在该步骤中执行:

bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

编译遇到输出错误:

ERROR: /home/thomas/tensorflow/tensorflow/core/BUILD:978:28: Executing genrule //tensorflow/core:proto_text_srcs_all failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions: /home/thomas/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions)
bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions: /home/thomas/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions)
bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions: /home/thomas/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions)
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

我怀疑这个错误与 anaconda 有关,因为 bazel 似乎在 ~/anaconda2/lib 中寻找 libstdc++.so。

最佳答案

这个命令似乎解决了我的问题:

conda install libgcc

来自 here .

关于ubuntu - 在带有 GPU : `GLIBCXX_3.4.20' not found 的 Ubuntu 16.04 上从源代码构建 TensorFlow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39727327/

相关文章:

java - 如何在不给端口号的情况下用域名访问tomcat应用

perl cpanm 安装 make 问题

python - 如何在急切执行模式下重用 tensorflow 变量?

tensorflow - Eager 模式优化器

linux - Swift 3 预览版 2 Linux 错误 : use of unresolved identifier

ubuntu - 如何在 docker ubuntu 基础上启动 cron?

node.js - 找不到命令 'pm2'

ios - Facebook 移动应用安装广告跟踪安装路径

eclipse - 如何为 Web 动态项目 Java EE 创建安装文件

python - 在keras自定义层中进行广播的逐元素乘法