使用baz从源代码编译tensorflow时出错

2024-04-27 03:37:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着跟着lgor's methodOption 4 - Compile tensorflow from source。 我没有使用root特权,我使用CentOS 7.0python 3.5 in Anacoda3's virtual environment。你知道吗

我试过step 1-7,到目前为止还不错。但是当我在./configure之后尝试bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package(没有GPU,请参见here)时,我得到了以下错误:

ERROR: /mnt/home/xx/dl_tensor/tensorflow/tensorflow/core/BUILD:168:1: null failed: protoc failed: error executing command bazel-out/host/bin/external/protobuf/protoc '--python_out=bazel-out/local-py3-opt/genfiles/' -I. -Iexternal/protobuf/python -Ibazel-out/local-py3-opt/genfiles/external/protobuf/python ... (remaining 38 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
bazel-out/host/bin/external/protobuf/protoc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by bazel-out/host/bin/external/protobuf/protoc)
bazel-out/host/bin/external/protobuf/protoc: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by bazel-out/host/bin/external/protobuf/protoc)
bazel-out/host/bin/external/protobuf/protoc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by bazel-out/host/bin/external/protobuf/protoc)
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

我想不出有什么问题,请帮我一把!你知道吗


Tags: pipbuildhostpackagebinusrtensorflowout