# 搭建主机环境

部署主机以进行编译和安装操作。

**前提条件：**

- 确保 Ubuntu 22.04 主机符合[主机要求](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/github_workflow_unregistered_users.html#host-machine-requirements)，机器人 SDK 需要额外的 50 GB 磁盘空间。

**步骤：**

1. 按照 [Ubuntu 主机设置](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/github_workflow_unregistered_users.html#build-with-standalone-commands)：中所述完成以下任务

    1. 安装依赖软件包。
    2. 搭建本地环境。
    3. 更新 git 配置。
2. 将 `/bin/sh` 符号链接更改为默认指向 `bash`。

sudo ln -sf /bin/bash /bin/sh
        Copy to clipboard
3. 从 [Qualcomm manifest](https://github.com/quic-yocto/qcom-manifest) 下载 Repo 工具。
4. 安装 libgtest-dev 包。

sudo apt install libgtest-dev
        Copy to clipboard

Note

关于虚拟机 (VM) 编译支持，请参阅 [Qualcomm Linux 虚拟机搭建指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-41/)。

Last Published: Jan 24, 2025

[Previous Topic
编译和安装](https://docs.qualcomm.com/bundle/publicresource/80-70017-265Y/topics/advanced-usage.md) [Next Topic
编译软件](https://docs.qualcomm.com/bundle/publicresource/80-70017-265Y/topics/build-the-software_4_1.md)