无法在Debian 7中安装Python3包

我在Debian 7中安装python3时遇到错误(我安装了所有更新):

root@nuclight:~# aptitude install python3
The following NEW packages will be installed:
  python3 python3.2{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,621 kB of archives. After unpacking 8,991 kB will be used.
Do you want to continue? [Y/n/?] 
Selecting previously unselected package python3.2.
dpkg: warning: files list file for package 'python3.2-minimal' missing; assuming package has no files currently installed
(Reading database ... 101541 files and directories currently installed.)
Unpacking python3.2 (from .../python3.2_3.2.3-7_amd64.deb) ...
Selecting previously unselected package python3.
Unpacking python3 (from .../python3_3.2.3-6_all.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for man-db ...
Setting up python3.2 (3.2.3-7) ...
/var/lib/dpkg/info/python3.2.postinst: 6: /var/lib/dpkg/info/python3.2.postinst: python3.2: not found
dpkg: error processing python3.2 (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.2 (>= 3.2.3); however:
  Package python3.2 is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.2
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up python3.2 (3.2.3-7) ...
/var/lib/dpkg/info/python3.2.postinst: 6: /var/lib/dpkg/info/python3.2.postinst: python3.2: not found
dpkg: error processing python3.2 (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.2 (>= 3.2.3); however:
  Package python3.2 is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.2
 python3

解决方法:

问题似乎是以下几行:

dpkg: warning: files list file for package 'python3.2-minimal' missing; assuming package has no files currently installed

你可以请运行以下内容:

apt-get update
apt-get remove python3.*
apt-get install python3

这将删除所有Python 3包,然后再次安装Python 3.看来你的当前安装有点破,因为python3.2二进制文件应该在(已经安装的)python3.2-minimal软件包中找不到.

上一篇:今日总结


下一篇:Please use the NLTK Downloader to obtain the resource: