TensorFlow的源码需要使用bazel进行编译,所以需要安装bazel构建工具
1.安装JDK 8
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer
2.向软件源中添加bazel信息
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
3.安装bazel
sudo apt-get update && sudo apt-get install bazel sudo apt-get upgrade bazel