我正在尝试安装 build-essential 包,但无法安装 g++ 和 libc6

我正在尝试安装 build-essential 包,但无法安装 g++ 和 libc6

首先,我对 Linux 还很陌生,才使用了整整两天。

我正在尝试使用 QT Creator 构建一个应用程序,但我无法使用 c++ 编译器,因为它不想安装。

我尝试安装构建必需品包可以正确使用 QT,这些包安装没有任何问题:

  1. dpkg-开发
  2. 海湾合作委员会
  3. 制作

尽管libc6克++没有,所以我尝试安装所有依赖项,但它却让我陷入一个奇怪的循环,它说libc6已安装。

这是我尝试安装该包的顺序:

:~$ sudo apt install build-essential
 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:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:7.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.```




:~$ sudo apt install libc-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libc6-dev' instead of 'libc-dev'
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:
 libc6-dev : Depends: libc6 (= 2.27-3ubuntu1) but 2.28-0ubuntu1+zorin4 is to be installed
             Depends: libc-dev-bin (= 2.27-3ubuntu1)
E: Unable to correct problems, you have held broken packages.






:~$ sudo apt install libc6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version (2.28-0ubuntu1+zorin4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.




现在请记住,我对 Linux 完全是个新手,所以任何帮助都会很感激。

相关内容