尝试执行任何apt操作时出现“ E:pycompile:233:未安装请求的版本”

用户名

每次我从存储库安装某些东西时,直到安装结束时,我都会收到如下错误消息(例如:gparted)-

harish@harish-desktop:~$ sudo apt-get install --reinstall gparted
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libbonoboui2-0 libbonoboui2-common libcf0 libgnomecanvas2-0
  libgnomecanvas2-common libgnomeui-0 libgnomeui-common libmysqlclient18
  libnetcdf-dev libnetcdfc++4 libnetcdff5 libpq5 libswscale2 libvtk5.8
  linux-headers-3.19.0-25 linux-headers-3.19.0-25-generic
  linux-image-3.19.0-25-generic linux-image-extra-3.19.0-25-generic
  mysql-common python-chardet-whl python-colorama python-colorama-whl
  python-distlib python-distlib-whl python-gnome2 python-html5lib
  python-html5lib-whl python-keybinder python-pip python-pip-whl
  python-pyorbit python-requests-whl python-setuptools-whl python-six-whl
  python-urllib3-whl python-vtk python-wheel python-wxmpl tcl-vtk
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Need to get 0 B/524 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 303324 files and directories currently installed.)
Preparing to unpack .../gparted_0.18.0-1_amd64.deb ...
Unpacking gparted (0.18.0-1) over (0.18.0-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Setting up apport (2.14.1-0ubuntu3.15) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package apport (--configure):
 subprocess installed post-installation script returned error exit status 3
dpkg: dependency problems prevent configuration of apport-gtk:
 apport-gtk depends on apport (>= 0.41); however:
  Package apport is not configured yet.

dpkg: error processing package apport-gtk (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Setting up apt-offline (1.3.1ubuntu0.1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package apt-offline (--configure):
 subprocess installed post-installation script returned error exit status 3
Setting up blueman (1.23-git201403102151-1ubuntu1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package blueman (--configure):
 subprocess installed post-installation script returned error exit status 3
No apport report written because MaxReports is reached already
                                                              Setting up gimp (2.8.10-0ubuntu1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package gimp (--configure):
 subprocess installed post-installation script returned error exit status 3
No apport report written because MaxReports is reached already
                                                              Setting up python-psutil (1.2.1-1ubuntu2) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package python-psutil (--configure):
 subprocess installed post-installation script returned error exit status 3
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of light-locker-settings:
 light-locker-settings depends on python-psutil; however:
  Package python-psutil is not configured yet.

dpkg: error processing package light-locker-settings (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up python-tz (2012c-1ubuntu0.1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package python-tz (--configure):
 subprocess installed post-installation script returned error exit status 3
No apport report written because MaxReports is reached already
                                                              Setting up gparted (0.18.0-1) ...
Errors were encountered while processing:
 apport
 apport-gtk
 apt-offline
 blueman
 gimp
 python-psutil
 light-locker-settings
 python-tz
E: Sub-process /usr/bin/dpkg returned an error code (1)

编辑1:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

编辑2:

harish@harish-desktop:~/test$ apt-cache policy apport
apport:
  Installed: 2.14.1-0ubuntu3.15
  Candidate: 2.14.1-0ubuntu3.15
  Version table:
 *** 2.14.1-0ubuntu3.15 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.14.1-0ubuntu3 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

编辑3:

harish@harish-desktop:~/test$ sudo dpkg --configure -a
[sudo] password for harish: 
Setting up gimp (2.8.10-0ubuntu1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package gimp (--configure):
 subprocess installed post-installation script returned error exit status 3
Setting up python-tz (2012c-1ubuntu0.1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package python-tz (--configure):
 subprocess installed post-installation script returned error exit status 3
Setting up blueman (1.23-git201403102151-1ubuntu1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package blueman (--configure):
 subprocess installed post-installation script returned error exit status 3
Setting up python-psutil (1.2.1-1ubuntu2) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package python-psutil (--configure):
 subprocess installed post-installation script returned error exit status 3
Setting up apport (2.14.1-0ubuntu3.15) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package apport (--configure):
 subprocess installed post-installation script returned error exit status 3
Setting up apt-offline (1.3.1ubuntu0.1) ...
E: pycompile:233: Requested versions are not installed
dpkg: error processing package apt-offline (--configure):
 subprocess installed post-installation script returned error exit status 3
dpkg: dependency problems prevent configuration of apport-gtk:
 apport-gtk depends on apport (>= 0.41); however:
  Package apport is not configured yet.

dpkg: error processing package apport-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of light-locker-settings:
 light-locker-settings depends on python-psutil; however:
  Package python-psutil is not configured yet.

dpkg: error processing package light-locker-settings (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gimp
 python-tz
 blueman
 python-psutil
 apport
 apt-offline
 apport-gtk
 light-locker-settings

编辑4:

harish@harish-desktop:~/test$ /usr/bin/python --version
Python 2.7.6

编辑5:

harish@harish-desktop:~/test$ head -n233 /usr/bin/pycompile | tail -1
log.error('Requested versions are not installed')

编辑6:

harish@harish-desktop:~/test$ apt-cache policy python-minimal
python-minimal:
  Installed: 2.7.5-5ubuntu3
  Candidate: 2.7.5-5ubuntu3
  Version table:
 *** 2.7.5-5ubuntu3 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
AB

您安装了不兼容的python版本,这破坏了apt命令。

因此,请下载一些Python软件包并通过以下命令进行安装

mkdir ~/repair_python
cd ~/repair_python
apt-get download python2.7-minimal libpython2.7-minimal python-minimal python2.7
sudo dpkg -i --force-all *.deb

删除一些软件包,因为sudo apt-get install -fsudo dpkg --congigure -a没有任何效果

sudo apt-get remove gimp apport apport-gtk apt-offline blueman python-psutil light-locker-settings python-tz

现在使用主服务器重新安装它们

sudo sed -i 's/in.archive/archive/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -f
sudo apt-get install gimp blueman light-locker-settings apport apport-gtk apt-offline
sudo apt-get install --reinstall gparted
sudo apt-get autoremove

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

当我尝试对R中的数据集进行升采样时,未执行任何操作

apt-cache显示要安装的新版本,但apt-get不执行任何操作

尝试执行pip安装时出现错误

尝试在npm中执行任何操作时出现SyntaxError

apt-get在执行删除--purge时尝试安装

尝试执行简单的http请求时出现JS错误错误

尝试使用certbot-auto程序在ubuntu 12.04上安装letsencrypt,但是在执行apt-get update时出现404错误

在尝试安装tomcat之后,在apt-get操作上执行insserv会导致很多错误

Ionic在安装时没有错误,但在执行时不执行任何操作

尝试使用 apt 安装软件包时出现奇怪的错误

在尝试安装损坏的 texlive 后,安装与 TexLive 相关的任何内容(包括 Texmaker)时出现问题

尝试安装任何模块时出现“无法从注册表获取消息”

尝试 pip 安装任何软件包时出现“EnvironmentError: [Errno 13] Permission denied”错误

尝试从wheezy升级到jessie时,apt-get dist-upgrade不会执行任何操作

请求位置时应用崩溃,而用户不执行任何操作

当我尝试在节点中执行https发布请求时,出现getaddrinfo ENOTFOUND错误

尝试使用角度 UI 执行获取请求时出现 base 64 图像未定义错误

当单击列表视图项时,未执行任何操作,并且LogCat显示ViewPostImeInputStage ACTION_DOWN

尝试在virtualbox中安装操作系统时出现“ VERR_SUPLIB_WORLD_WRITABLE”错误

安装Maven时出现问题,尝试了所有操作后无法正常工作

尝试安装pip模块时出现操作不允许错误

尝试安装Eclipse时出现“ bash:./ eclipse:无法执行二进制文件”

尝试监视Azure Batch任务时获取``禁止对未绑定对象执行此操作''

尝试编译代码时,gcc不会执行任何操作

尝试在Angular中执行Delete操作时出现错误

E: py3compile:243: 未安装请求的版本

尝试安装任何内容时,出现“不受信任的程序包可能会损害系统的安全性”

尝试在azure应用程序中更新nodejs版本时出现问题。无法在Azure中为应用执行构建

当我尝试安装分区时,Thunar表示“未授权执行此操作”。我怎样才能解决这个问题?