繁体   English   中英

无法安装 python-dev

[英]Unable to install python-dev

当我尝试在 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

为了解决这个问题,我到底需要做什么? 错误不是很清楚...

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

sudo apt-get update --fix-missing

sudo dpkg --configure -a

sudo apt-get install -f

如果 package 损坏的问题仍然存在,解决方法是手动编辑 dpkg 状态文件。

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

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

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

这个链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM