自从周日把刚把安装好的Debian12搞坏后,这两天一直在重装系统,就没有完全成功过,好在最后一次安装Debian11的时候,系统起来后有网络,但在安装桌面及GNOME时失败了,只能开机进入命令行模式。
安装gcc 和 g++ 只需要一个命令就可以了,我的 source.list 里是阿里源,如:
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
更改源后,apt update,然后就一个命令:apt -y install build-essential
它安装的是这个版本。