0

I tried to install the newest version of Python in my Ubuntu laptop. When I finished installing it, I realized that my Terminal and some other apps were gone. They were not among my favorites where I had them and I searched for them and they were gone.

I restarted my laptop to see if that fixed the problem. When it turned on, it automatically went to tty terminal.

I searched online and I found this forum so I run:

sudo apt-get remove --purge gnome-terminal

and:

sudo apt-get install gnome-terminal

However, I got:

Errors were encountered while processing:
update-notifier-common
Sub-process /usr/bin/dpkg returned an error code (1)

I searched online and I tried running all solutions in this article one by one:

sudo apt remove --purge update-notifier-common

Once I did this, the Sub-process error disappeared and I (apparently) was able to install the Terminal again, but now it does not open.

Again, in the tty terminal I run:

gnome-terminal --version

And it says:

Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
ModuleNotFoundError: No module named 'gi'

For this issue I found this thread from 7 years ago. Some of the solutions given there are not recommended by other users, so I avoided them. From this thread, I tried the following:

sudo update-alternatives --config python3

and it said:

update-alternatives: error: no alternatives for python 3

At this point, I don't know what else to do. The last thread seems a bit outdated. Can anyone help me with some updated solutions? I'd appreciate it.

Elena
  • 1
  • 2
  • Hi, thanks for the answer. Unfortunately, it did not help. I even removed and reinstalled python3, which made my desktop GUI disappear, and I had to reinstall it. Once I reinstalled it, I got the error that I got at the beginning: Errors were encountered while processing: update-notifier-common update-notifier ubuntu-desktop ubuntu-desktop-minimal Sub-process /usr/bin/dpkg returned an error code (1) – Elena Mar 17 '24 at 20:42

1 Answers1

0

Seems like your system missing the gi.repository python module. You need to install it.

sudo apt install python3-gi
  • Thanks, I tried this first, but it did not work. Still the same issue, the terminal loads for a while and then just stop responding. – Elena Mar 17 '24 at 20:13