您的位置:首页 > 编程语言 > Python开发

[转]ubuntu10.10升级到11.04过程中python2.7升级出错的解决方法(安装wine过程中出错)

2011-05-31 14:25 1361 查看
今天安装Wine出错,提示python升级出错,搜索后,得到这个文章,现在已经正常 。

转自 独行的猪

10.10默认python是2.6
11.04默认python是2.7

这个问题貌似在debian上也会出现

现象就是升级python2.7 python2.7-minimal时提示
Preconfiguring packages ...
Setting up python2.7-minimal (2.7.1-1ubuntu4) ...
Linking and byte-compiling packages for runtime python2.7...
E: pycompile:240: Requested versions are not installed
dpkg: error processing python2.7-minimal (--configure):
subprocess installed post-installation script returned error exit status 3
Errors were encountered while processing:
python2.7-minimal

问题详述可见 https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/693001

问题出在python2.7-minimal的postinst脚本会去执行
/usr/share/python/runtime.d/public_modules.rtinstall
脚本,在public_modules.rtinstall中需要执行
pycompile -V 2.7 /usr/lib/python2.7 ,而这时候python2.7根本还没装,就导致循环出错了

相关讨论见 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600529

解决方法:
在提示出错后,修改 /usr/share/python/runtime.d/public_modules.rtinstall ,注释掉所有的内容,
然后 apt-get -f install
待正常后,再执行一次 pycompile -V 2.7 /usr/lib/python2.7/dist-packages 就行了
http://groups.google.com/group/shlug/browse_thread/thread/e644a0032af587a1?pli=1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: