---
category: help
layout: help
mirrorid: bazel-apt
---

## bazel-apt 镜像使用帮助

使用以下命令启用 bazel-apt 仓库

```bash
sudo apt install apt-transport-https curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://{{ site.hostname }}/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
```

使用以下命令安装 bazel

```bash
sudo apt update && sudo apt install bazel
```
