1

使用此代码在 kali linux 中安装 python-dev 时出现问题

sudo apt-get install python-dev

但它带有这条消息

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:
libc6-dev : Breaks: libgcc-9-dev (< 9.3.0-5~) but 9.2.1-19 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

请帮我

4

2 回答 2

0

以下软件包具有未满足的依赖关系: libc6-dev : Breaks: libgcc-9-dev (< 9.3.0-5~) 但要安装 9.2.1-19 E: 错误,pkgProblemResolver::Resolve 生成​​的中断,这可能是由持有的包裹引起的。

基本上意味着您需要安装/更新 libgcc-9-dev (依赖)

你可以试试

使用此代码在 kali linux 中安装 python-dev 时出现问题

sudo apt-get install libgcc-9-dev 

之后您可以再试一次。

sudo apt-get install python-dev

如果这不起作用,我建议这样做:

sudo apt --fix-broken install
于 2021-02-02T20:49:52.427 回答
0

所以,我遇到了同样的错误,但是在尝试安装 pip 时,sudo apt install python3-pip. 我试过sudo apt install libgcc-9-dev了,但这只是给了我另一个类似的错误,使用不同的包:

The following packages have unmet dependencies:
 libgcc1 : Depends: gcc-9-base (= 9.2.1-19) but 9.3.0-22 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

所以我尝试了sudo apt install gcc-9-base。然后我就可以使用sudo apt install python3-pip了,而且效果很好。(python3-pip对于我的情况,OP可以使用sudo apt-get install python-dev

于 2021-08-01T19:45:09.987 回答