0

I was actually trying to update my python package to current version using update-alternatives. Since am not much familiar with it, I tried to get it done by watching YouTube videos. from one of such videos I unfortunately gave the command sudo unlink /usr/bin/python which soon after made terminal and software updater not working.but somehow I was able to open the terminal via "files" and also when I tried to install some new software(Xterm) via terminal at end of the process it shows like

kayalvizhi@eyegirl:~$ sudo apt-get install xterm
Reading package lists... Done
Building dependency tree       
Reading state information... Done

xterm is already the newest version (330-1ubuntu2). The following packages were automatically installed and are no longer required: libllvm7 libllvm9 Use 'sudo apt autoremove' to remove them. The following packages will be upgraded: python3-distupgrade 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 5 not fully installed or removed. Need to get 0 B/106 kB of archives. After this operation, 1,024 B of additional disk space will be used. (Reading database ... 207547 files and directories currently installed.) Preparing to unpack .../python3-distupgrade_1%3a18.04.38_all.deb ... /var/lib/dpkg/info/python3-distupgrade.prerm: 6: /var/lib/dpkg/info/python3-distupgrade.prerm: py3clean: not found dpkg: warning: old python3-distupgrade package pre-removal script subprocess returned error exit status 127 dpkg: trying script from the new package instead ... /var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found dpkg: error processing archive /var/cache/apt/archives/python3-distupgrade_1%3a 18.04.38_all.deb (--unpack): new python3-distupgrade package pre-removal script subprocess returned error exit status 127 /var/lib/dpkg/info/python3-distupgrade.postinst: 6: /var/lib/dpkg/info/python3-distupgrade.postinst: py3compile: not found dpkg: error while cleaning up: installed python3-distupgrade package post-installation script subprocess returned error exit status 127 Errors were encountered while processing: /var/cache/apt/archives/python3-distupgrade_1%3a18.04.38_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

then I gave the command

sudo dpkg --configure -a

kayalvizhi@eyegirl:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on python3-distupgrade (= 1:18.04.38); however:
  Version of python3-distupgrade on system is 1:18.04.37.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core: ubuntu-release-upgrader-core depends on python3-distupgrade (= 1:18.04.38); however: Version of python3-distupgrade on system is 1:18.04.37.

dpkg: error processing package ubuntu-release-upgrader-core (--configure): dependency problems - leaving unconfigured Setting up python3-lib2to3 (3.6.9-1~18.04) ... Setting up python3-distutils (3.6.9-1~18.04) ... dpkg: error processing package python3-distupgrade (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Setting up dh-python (3.20180325ubuntu2) ... /var/lib/dpkg/info/dh-python.postinst: 6: /var/lib/dpkg/info/dh-python.postinst: py3compile: not found dpkg: error processing package dh-python (--configure): installed dh-python package post-installation script subprocess returned error exit status 127 dpkg: dependency problems prevent configuration of python3-all: python3-all depends on dh-python; however: Package dh-python is not configured yet.

dpkg: error processing package python3-all (--configure): dependency problems - leaving unconfigured Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Errors were encountered while processing: ubuntu-release-upgrader-gtk ubuntu-release-upgrader-core python3-distupgrade dh-python python3-all

and I also have a red sphere with a minus sign into it, whenever I take my cursor to it, it shows me like

a problem occurred when checking for the updates

How can I get back everything to be normal?

0 Answers0