gpt4 book ai didi

python - 无法安装 python-dev

转载 作者:太空宇宙 更新时间:2023-11-03 17:03:39 25 4
gpt4 key购买 nike

当我尝试在我的 Ubuntu 14.04 上为 Python2 安装 python-dev、libxml2-dev、libxslt-dev 时,出现以下错误:

E: Unable to correct problems, you have held broken packages
E: Unable to correct problems, you have held broken packages
E: Unable to correct problems, you have held broken packages
Reading package lists...
Building dependency tre...
Reading state information...
Some packaghes 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 nor been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependecies:
python-dev : Depends: libpython-dev (= 2.7.5-5ubuntu3) but it is not going to be installed
Depends: python2.7-dev (>= 2.7.5-1~) but it is not going to be installed

我需要做什么才能解决这个问题?错误不是很清楚...

最佳答案

您可能只需要修复不稳定的状态。重新启动并尝试...

sudo apt-get update --fix-missing

sudo dpkg --configure -a

sudo apt-get install -f

如果破包问题依然存在,解决方法是手动编辑dpkg状态文件。

$ sudo nano /var/lib/dpkg/status #(you can use vim or gedit instead of nano)

找到损坏的包,删除有关它的整个信息 block 并保存文件。

# Unlock the dpkg – (message /var/lib/dpkg/lock)
sudo fuser -vki /var/lib/dpkg/lock
sudo dpkg --configure -a

来自 this link .

关于python - 无法安装 python-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58462509/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com