0

Whenever i'm trying to install any program Ubuntu is showing this ;

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gedit
Suggested packages:
  gedit-plugins
The following packages will be upgraded:
  gedit
1 upgraded, 0 newly installed, 0 to remove and 83 not upgraded.
24 not fully installed or removed.
Need to get 0 B/408 kB of archives.
After this operation, 8,192 B disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 281827 files and directories currently installed.)
Preparing to unpack .../gedit_3.28.1-1ubuntu1.2_amd64.deb ...
/var/lib/dpkg/info/gedit.prerm: 12: /var/lib/dpkg/info/gedit.prerm: py3clean: not found
dpkg: warning: old gedit package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 12: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/gedit_3.28.1-1ubuntu1.2_amd64.deb (--unpack):
 new gedit package pre-removal script subprocess returned error exit status 127
/var/lib/dpkg/info/gedit.postinst: 32: /var/lib/dpkg/info/gedit.postinst: py3compile: not found
dpkg: error while cleaning up:
 installed gedit package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/gedit_3.28.1-1ubuntu1.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
guiverc
  • 30,396

1 Answers1

0

The two important lines from the log you posted are:

/var/lib/dpkg/info/gedit.prerm: 12: /var/lib/dpkg/info/gedit.prerm: py3clean: not found

and:

/var/lib/dpkg/info/gedit.postinst: 32: /var/lib/dpkg/info/gedit.postinst: py3compile: not found

They tell us that you're missing py3clean and py3compile, both of which are part of a Python install (specifically, Python 3). Your Python is broken.

There are a couple of things you can do to fix this. Try running

apt-get -f install

and/or

dpkg --configure -a

as root. Both of these will try to find and fix broken dependencies. If they don't work (and they might well not -- they're useful commands to try, but not panaceas), try the steps given by various answers to this question.

user3137493
  • 101
  • 1