无法安装 Python ubuntu 14.04

无法安装 Python ubuntu 14.04

安装 python 3.4 后遇到了一些问题,所以我想回到 2.7。所以我彻底删除了 python...

现在当我运行这个命令时:

sudo apt-get install python(tried all versions here)

我刚刚收到一堆错误:

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 apport : Depends: python3 but it is not going to be installed
          Depends: python3-apport (>= 2.14.1-0ubuntu3.15) but it is not going to be installed
          Depends: python3-gi but it is not going to be installed
 lsb-release : Depends: python3 but it is not going to be installed
               Depends: python3:any (>= 3.3.2-2~)
 sessioninstaller : Depends: aptdaemon (>= 0.30) but it is not going to be installed
 software-center : Depends: aptdaemon (>= 0.40) but it is not going to be installed
                   Depends: oneconf (>= 0.2.6) but it is not going to be installed
                   Recommends: update-notifier but it is not going to be installed
                   Recommends: software-properties-gtk but it is not going to be installed
 software-center-aptdaemon-plugins : Depends: python3-gi but it is not going to be installed
 xdiagnose : Depends: python3:any (>= 3.3.2-2~)
             Depends: python3-gi (>= 3.2.0-3) but it is not going to be installed
             Depends: python3-apport but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

所以我尝试了:

sudo apt-get -f install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  account-plugin-twitter apg app-install-data appmenu-qt appmenu-qt5
  apt-xapian-index avahi-utils bamfdaemon consolekit cups-pk-helper dc
  diffstat dmidecode dnsmasq-base docbook-xml docbook-xsl gedit-common
  gir1.2-accounts-1.0 gir1.2-accountsservice-1.0 gir1.2-appindicator3-0.1
  gir1.2-atspi-2.0 gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0
  gir1.2-coglpango-1.0 gir1.2-dbusmenu-glib-0.4 gir1.2-dee-1.0
  gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2 gir1.2-edataserver-1.2
  gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdata-0.0 gir1.2-gdesktopenums-3.0
  gir1.2-gdm-1.0 gir1.2-gkbd-3.0 gir1.2-gmenu-3.0 gir1.2-gnomebluetooth-1.0
  gir1.2-gnomedesktop-3.0 gir1.2-gnomekeyring-1.0 gir1.2-goa-1.0
  gir1.2-gst-plugins-base-1.0 gir1.2-gtksource-3.0 gir1.2-gudev-1.0
  gir1.2-javascriptcoregtk-3.0 gir1.2-json-1.0 gir1.2-messagingmenu-1.0
  gir1.2-mutter-3.0 gir1.2-networkmanager-1.0 gir1.2-nmgtk-1.0
  gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-polkit-1.0 gir1.2-rb-3.0
  gir1.2-secret-1 gir1.2-signon-1.0 gir1.2-telepathyglib-0.12
  gir1.2-telepathylogger-0.2 gir1.2-udisks-2.0 gir1.2-unity-5.0
  gir1.2-upowerglib-1.0 gir1.2-webkit-3.0 gir1.2-wnck-3.0 gir1.2-xkl-1.0 gjs
  gkbd-capplet gnome-calculator gnome-control-center-data
  gnome-control-center-shared-data gnome-shell-common gnome-themes-standard
  gnome-themes-standard-data gtk2-engines-pixbuf hardening-includes icoutils
  indicator-appmenu indicator-datetime indicator-keyboard indicator-messages
  indicator-power indicator-printers indicator-session indicator-sound
  intel-gpu-tools intltool-debian iptables iputils-arping kate-data katepart
  kde-l10n-engb kde-l10n-sv kde-runtime-data kdelibs-bin kdelibs5-data
  kdelibs5-plugins kdoctools laptop-detect libapparmor-perl libapt-pkg-perl
  libarchive-zip-perl libattica0.4 libautodie-perl libbaloocore4
  libbaloofiles4 libbalooxapian4 libbamf3-2 libcaribou-common libcaribou0
  libclass-accessor-perl libcrypt-passwdmd5-perl libdlrestrictions1
  libdmapsharing-3.0-2 libemail-valid-perl libepub0 libgail-common libgail18
  libgdm1 libgee2 libgjs0e libglew1.10 libglewmx1.10 libgnome-bluetooth11
  libgnome-keyring-common libgnome-keyring0 libgnome-menu-3-0
  libgnomekbd-common libgnomekbd8 libgoa-backend-1.0-1 libgpod-common libgpod4
  libgtksourceview-3.0-1 libgtksourceview-3.0-common libio-pty-perl
  libio-string-perl libipc-run-perl libipc-system-simple-perl
  libkactivities-bin libkactivities-models1 libkactivities6
  libkatepartinterfaces4 libkcmutils4 libkde3support4 libkdeclarative5
  libkdecore5 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4
  libkfile4 libkhtml5 libkidletime4 libkio5 libkjsapi4 libkjsembed4
  libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4
  libkpty4 libkrosscore4 libktexteditor4 libkubuntu0 libkxmlrpcclient4
  liblightdm-gobject-1-0 liblist-moreutils-perl liblouis-data liblouis2
  libmbim-glib0 libmm-glib0 libmnl0 libmozjs-24-0 libmutter0c libnepomuk4
  libnepomukcleaner4 libnepomukcore4abi1 libnepomukquery4a libnepomukutils4
  libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl
  libnetfilter-conntrack3 libnfnetlink0 libnl-route-3-200 libnm-glib-vpn1
  libnm-gtk-common libnm-gtk0 libntrack-qt4-1 libntrack0 libnux-4.0-0
  libnux-4.0-common libpam-ck-connector libparse-debianchangelog-perl
  libperlio-gzip-perl libphonon4 libplasma3 libpolkit-qt-1-1 libpoppler-qt4-4
  libqapt2 libqapt2-runtime libqca2 libqjson0 libqmi-glib0 libqmobipocket1
  libqt4-qt3support librhythmbox-core8 libsgutils2-2 libsolid4 libsoprano4
  libstreamanalyzer0 libstreams0 libsub-identify-perl libsub-name-perl
  libtelepathy-qt4-2 libtext-levenshtein-perl libthreadweaver4 libtimezonemap1
  libunity-core-6.0-9 libunity-gtk2-parser0 libunity-gtk3-parser0
  libunity-misc4 liburl-dispatcher1 libvirtodbc0 libxklavier16 libxml2-utils
  libzip2 lightdm lintian media-player-info mobile-broadband-provider-info
  modemmanager mousetweaks mscompress mutter-common nepomuk-core-data
  nepomuk-core-runtime network-manager network-manager-gnome
  network-manager-pptp network-manager-pptp-gnome ntrack-module-libnl-0
  nux-tools obexd-client odbcinst odbcinst1debian2 oneconf-common
  oxygen-icon-theme patchutils phonon phonon-backend-gstreamer
  phonon-backend-gstreamer-common phonon-backend-gstreamer1.0
  plainbox-secure-policy plasma-scriptengine-javascript pptp-linux
  python-colorama-whl python-cups python-cupshelpers python-debtagshw
  python-distlib-whl python-gnomekeyring python-html5lib-whl python-lxml
  python-oneconf python-piston-mini-client python-requests-whl
  python-setuptools-whl python-six-whl python-smbc python-urllib3-whl
  qtdeclarative5-localstorage-plugin rhythmbox-data sgml-data
  shared-desktop-ontologies signon-keyring-extension soprano-daemon syslinux
  syslinux-common syslinux-legacy system-config-printer-common
  system-config-printer-udev t1utils telepathy-indicator ubuntu-extras-keyring
  ubuntu-system-service unity-greeter unity-gtk-module-common
  unity-gtk2-module unity-gtk3-module unity-lens-applications unity-lens-files
  unity-lens-music unity-lens-video unity-scope-musicstores
  unity-scope-video-remote unity-scopes-master-default unity-scopes-runner
  unity-services usb-modeswitch usb-modeswitch-data virtuoso-minimal
  virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common wpasupplicant
  xul-ext-ubufox
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gdb libpython3-stdlib
Suggested packages:
  gdb-doc gdbserver
Recommended packages:
  python3
The following packages will be REMOVED:
  apport lsb-release python-commandnotfound sessioninstaller software-center
  software-center-aptdaemon-plugins xdiagnose
The following NEW packages will be installed:
  gdb libpython3-stdlib
0 upgraded, 2 newly installed, 7 to remove and 1 not upgraded.
9 not fully installed or removed.
Need to get 0 B/2 205 kB of archives.
After this operation, 935 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 231214 files and directories currently installed.)
Removing apport (2.14.1-0ubuntu3.15) ...
/var/lib/dpkg/info/apport.prerm: 14: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: error processing package apport (--remove):
 subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Removing sessioninstaller (0.20+bzr141-0ubuntu4) ...
/var/lib/dpkg/info/sessioninstaller.prerm: 6: /var/lib/dpkg/info/sessioninstaller.prerm: pyclean: not found
dpkg: error processing package sessioninstaller (--remove):
 subprocess installed pre-removal script returned error exit status 127
Removing python-commandnotfound (0.3ubuntu12) ...
/var/lib/dpkg/info/python-commandnotfound.prerm: 6: /var/lib/dpkg/info/python-commandnotfound.prerm: pyclean: not found
dpkg: error processing package python-commandnotfound (--remove):
 subprocess installed pre-removal script returned error exit status 127
Removing lsb-release (4.1+Debian11ubuntu6) ...
/var/lib/dpkg/info/lsb-release.prerm: 6: /var/lib/dpkg/info/lsb-release.prerm: pyclean: not found
dpkg: error processing package lsb-release (--remove):
 subprocess installed pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: error processing package software-center (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Removing software-center-aptdaemon-plugins (0.1.6build1) ...
/var/lib/dpkg/info/software-center-aptdaemon-plugins.prerm: 6: /var/lib/dpkg/info/software-center-aptdaemon-plugins.prerm: pyclean: not found
dpkg: error processing package software-center-aptdaemon-plugins (--remove):
 subprocess installed pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              Removing xdiagnose (3.6.3build2) ...
/var/lib/dpkg/info/xdiagnose.prerm: 6: /var/lib/dpkg/info/xdiagnose.prerm: pyclean: not found
dpkg: error processing package xdiagnose (--remove):
 subprocess installed pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 apport
 sessioninstaller
 python-commandnotfound
 lsb-release
 software-center
 software-center-aptdaemon-plugins
 xdiagnose
E: Sub-process /usr/bin/dpkg returned an error code (1)

所以我现在不确定该怎么做...关于如何解决这个问题有什么建议吗?

答案1

下载并安装并强制安装python-minimalpyclean不在您的系统上

cd
apt-get download python-minimal
sudo dpkg -i --force-all python-minimal_2.7.5-5ubuntu3_amd64.deb
sudo apt-get install -f

相关内容