我正在尝试在 Ubuntu 22.04.1 LTS 上安装 g++ 编译器,并得到以下信息:
$ sudo apt-get 安装 g++
Reading package lists... Done
Building dependency tree... Done
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 resolve the situation:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3) but 2.35-0ubuntu3.1 is to be installed
E: Unable to correct problems, you have held broken packages.
跑步
$ dpkg --get-selections | grep hold
什么都没返回。我是 Linux 新手,所以我不知道下一步该做什么。
有谁知道如何解决这个问题?
问候,--DrB。
更新 1:我试过了
$ sudo apt install build-essential
但这给了我完全相同的结果。
更新 2:我降级了 libc6,如下所示:
$ sudo apt 安装 libc6=2.35-0ubuntu3 libc-bin=2.35-0ubuntu3
之后,命令
$ sudo apt-get 安装 g++
工作得很好。
但是:notepadqq 不再起作用。
现在的问题是……我怎样才能找出我还破坏了什么?