ubuntu20.04安装bazel
时间: 2023-08-21 17:08:36 浏览: 487
ubuntu20.04安装教程
要在Ubuntu 20.04上安装bazel,可以按照以下步骤进行操作:
1. 首先,设置bazel的镜像源。打开终端并执行以下命令:
```
sudo apt install curl gnupg
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64 https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
```
2. 接下来,更新软件包列表并搜索可用的bazel版本。在终端中执行以下命令:
```
sudo apt update && sudo apt search bazel
```
选择合适的版本进行安装。
3. 安装bazel。执行以下命令:
```
sudo apt install bazel
```
4. 创建符号链接。执行以下命令:
```
mkdir ~/bin
ln -s /usr/bin/bazel ~/bin/bazel
```
这样,你就成功在Ubuntu 20.04上安装了bazel。你现在可以使用bazel来编译你的项目了。请注意,以上步骤仅适用于使用官方资源的安装方法。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [在Ubuntu 20上安装bazel](https://blog.csdn.net/huzhenwei/article/details/121892132)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [【编译日志打包】TensorFlow1.31.1源码编译,使支持计算能力3.0的GPU显卡!.zip](https://download.csdn.net/download/hardwork617s/14121328)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文