在带有GPU的Ubuntu 16.04上从源代码构建TensorFlow:找不到'GLIBCXX_3.4.20' [英] Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found

查看:249
本文介绍了在带有GPU的Ubuntu 16.04上从源代码构建TensorFlow:找不到'GLIBCXX_3.4.20'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Ubuntu 16.04上,并根据

I'm on Ubuntu 16.04 and am trying to build TensorFlow with GPU support from source according to this. Everything works fine until the "Build TensorFlow" step, in which I execute:

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.

My suspicion is that the error has something to do with anaconda since bazel seems to be looking for libstdc++.so from within ~/anaconda2/lib.

推荐答案

此命令似乎可以解决我的问题:

This command seemed to fix my problem:

conda install libgcc

来自此处.

这篇关于在带有GPU的Ubuntu 16.04上从源代码构建TensorFlow:找不到'GLIBCXX_3.4.20'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆