网上找了下,基本没有合适的答案,后来发现是前期编译其他东西,升级Python版本从2.7到3.4了,那好 办,降回来。
重新安装2.7提示达到 MaxReports 限制,没有写入 apport 报告的错误
参照https://blog.csdn.net/u014590211/article/details/81875335
将info文件夹更名
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
再新建一个新的info文件夹
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo apt-get -f install
执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old
把自己新建的info文件夹删掉
sudo rm -rf /var/lib/dpkg/info
把以前的info文件夹重新改回名字
sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info
现在Python2.7安装成功了,但是还会用到3.4的,做个切换。
update-alternatives --list python
如果提示错误:无python 的候选项,将Python路径加进去。
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
通过update-alternatives --config python命令,就可以切换了,切换回2,7,可以正常编译kernel了。
网友评论