在Ubuntu 16.04上使用GPU建立TensorFlow:找不到`GLIBCXX_3.4.20'

Fey*_*n27 3 installation ubuntu anaconda bazel tensorflow

我在Ubuntu 16.04,我试图根据从源代码与GPU支持建立TensorFlow .一切正常,直到"Build TensorFlow"步骤,我执行:

bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
Run Code Online (Sandbox Code Playgroud)

编译遇到输出错误:

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.
Run Code Online (Sandbox Code Playgroud)

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

Fey*_*n27 9

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

conda install libgcc
Run Code Online (Sandbox Code Playgroud)

这里开始.