在Ubuntu 上安装G++不成功遇到如下错误:
ubuntu:~/IC/3.3$ sudo apt install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
g++ : Depends: g++-9 (>= 9.3.0-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
原因:
Linux下经常需要安装不同类型的库,在Ubuntu中,这些类库都是以“lib_name-version”的形式命名的。很多库之间存在依赖关系,即要安装这个就必须安装那个。有时候,类库之间依赖