gcc 版本升级一直失败 error: #error “You’re trying to build PyTorch with a too old version of GCC. We need GCC 9 or later.”
╰─# apt-get install gcc-11.4 g++
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package gcc-11.4
E: Couldn’t find any package by glob ‘gcc-11.4’
E: Couldn’t find any package by regex ‘gcc-11.4’
问题描述
gcc 版本升级一直失败
apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists… Done
#apt-get update 也没用:
解决方案:
sudo apt install build-essential manpages-dev software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt install gcc-11 g+±11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110
1478

被折叠的 条评论
为什么被折叠?



