1.背景
由于新安装了Ubuntu20.04,VScode运行C语言需安装gcc、g++和gdb,在安装g++时遇到报错:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3) but 2.35-0ubuntu3.1 is to be installed
2.解决方案
- sudo apt-get update & sudo apt-get upgrade
- sudo apt-get installlibc6=2.35-0ubuntu3
- sudo apt-get install g++