Ubuntu安装Bazel
来源:互联网 发布:淘宝产品资质认证 编辑:程序博客网 时间:2024/04/20 07:57
参考Installing Bazel
Bazel是一个编译软件。
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
- echo “deb 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 -
- sudo apt-get update
- 此时可能出现
W: 无法下载 http://storage.googleapis.com/bazel-apt/dists/stable/InRelease Unable to find expected entry ‘jdk1.8/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
的错误,解决:
sudo vim /etc/apt/sources.list.d/bazel.list
将deb http://storage.googleapis.com/bazel-apt stable jdk1.8修改为deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8
参考Unable to find expected entry ‘main/binary-i386/Packages - Chrome [duplicate]
Software Update fails - Unable to find expected entry
- 此时可能出现
- sudo apt-get install bazel
- sudo apt-get upgrade bazel
- Bazel基本用法
- 参考Getting Started with Bazel
- 创建/home/majing/workspace/bazel-project目录
- 在bazel-project目录下创建WORKSPACE空文件
- mkdir -p src/main/java/com/example
- cat > src/main/java/com/example/ProjectRunner.java
<< EOF package com.example;
public class ProjectRunner {
public static void main(String args[]) {
Greeting.sayHi();
}
}
EOF - cat > src/main/java/com/example/Greeting.java << EOF
package com.example;
public class Greeting {
public static void sayHi() {
System.out.println(“Hi!”);
}
}
EOF - 创建BUILD文件,写入# ~/gitroot/my-project/BUILD
java_binary(
name = “my-runner”,
srcs = glob([“*/.java”]),
main_class = “com.example.ProjectRunner”,
) - bazel build //:my-runner
- bazel-bin/my-runner
10.
1 0
- Ubuntu安装Bazel
- Ubuntu安装Bazel
- 安装Bazel
- Bazel安装
- Install Bazel on Ubuntu
- centos7 下安装bazel
- Ubuntu16.04安装bazel
- Ubuntu16.04 安装bazel
- Ubuntu16.04安装bazel
- linux下安装bazel
- bazel
- bazel
- ubuntu 1604 native 原生安装 tensorflow 以及sonnet,无须编译bazel
- tensorflow 之 bazel安装 & 使用
- 安装 Bazel、SWIG与Numpy
- tensorflow 之 bazel安装 & 使用
- Redhat环境下编译安装Google Bazel
- 搭建heron环境(二) 安装bazel
- 构建WebIM聊天程序
- hadoop hdfs运行机制
- js常用函数
- 带着37度不雅观观参不雅观观去……征服银河系
- GCC 提供的原子操作
- Ubuntu安装Bazel
- 1045 Bode Plot
- SHELL编程之执行环境
- table control中用帮助(F4)实现自动填充另一字段
- 大开天气使用到的工具以及方法总结
- Activity的生命周期
- pfx文件
- java RandomAccessFile
- ant安装使用指南