ubuntu16.04 apt-get python报错
报错如下# apt-get -y installpythonReading package lists... DoneBuilding dependency treeReading state information... DoneSome packages could not be installed. This may mean that you haverequested an imposs
·
报错如下
# apt-get -y install python
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:
python : PreDepends: python-minimal (= 2.7.12-1~16.04) but it is not going to be installed
Depends: python2.7 (>= 2.7.12-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
解决方案
用这条命令看你损坏的包然后卸载了
#查看包
dpkg --get-selections | grep python
#卸载
sudo apt-get remove libpython2.7
sudo apt-get remove libpython2.7-minimal
sudo apt-get remove libpython2.7-stdlib
把有关的包都卸载了,然后再
sudo apt-get insatll python
更多推荐
已为社区贡献4条内容
所有评论(0)