# 安装本地 GCC 编译器

本地编译器：编译器本身运行的平台与该编译器编译出的二进制程序运行平台一致。

Loongbian 提供 Loongson（mips64el）平台下的本地编译器。

## 安装

进入 root 用户 shell（如使用 `su -` 命令），然后运行

```
$ apt install ca-certificates apt-transport-https wget
$ echo "deb https://mirrors.teach.com.cn/toolchain/debian buster main" > /etc/apt/sources.list.d/loongbian-toolchain.list
$ wget https://mirrors.teach.com.cn/loongbian/loongbian-archive-keyring.gpg -O - | apt-key add -
$ apt update
$ apt install build-essential
```

## 验证安装是否成功

```
$ gcc -v
...
gcc version 8.3.0 (Debian 8.3.0-6+loongbian1)
```

确保版本号中包含 `loongbian` 字样。
