5

Throughout all this process connection to the Internet was working properly.

Every time I turned on my computer an error message popped saying "System program problem detected". I'm certain it is about this issue. Also noted: the OS is Ubuntu 18.04.

First, it did not update anything while using the clicking method (through GUI). Software Updater appeared, showed the updates and then I clicked "Install Now" but began the process and when arriving some of the first steps, it disappears.

For this problem I tried updating and upgrading manually using the terminal (sudo apt-get update && sudo apt-get upgrade). This solved part of the problem as most of the packages got to be updated.

Nonetheless, the problem persists as Ubuntu base (security updates) and Unused kernel updates to be removed keep appearing with the same problem happening after hitting the "Install Now" button. I tried again with the terminal and the problem prevails along with the "System program problem detected" message.

Failed solutions:

a) I thought that Internet connection was the origin of the problem but I uninstalled Wicd and reinstalled it. b) I tried: sudo rm -rvf /var/lib/apt/lists/* and then sudo apt-get update, as this answer to another post says.

What can I do? Thanks.

Output for sudo apt-get update:

Hit:1 http://es.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.canonical.com bionic InRelease
Get:3 http://es.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]                         
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83,2 kB]                          
Get:5 http://es.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]                   
Fetched 247 kB in 1s (337 kB/s)                                                                  
Reading package lists... Done

Output for sudo apt-get upgrade:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gir1.2-javascriptcoregtk-4.0 gir1.2-webkit2-4.0 libjavascriptcoregtk-4.0-18 libwebkit2gtk-4.0-37 linux-generic linux-headers-generic
  linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
1
  • I would suggest copy/pasting the errors (or whole output) for your sudo apt-get update or upgrade to your question, so we can see the error which is the best clue for fixing your issue. Currently your 'problem' is undefined except to you as only you can see it.
    – guiverc
    Oct 11, 2018 at 11:30

3 Answers 3

4

Firstly, update the following:

sudo apt autoremove && sudo apt autoclean -y

then open nano by sudo nano /etc/apt/sources.list and check for any mismatches of default ubuntu update repo's:

Note -

16.04 - Xenial

18.04 - Bionic

deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse

deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse

If its easier then, delete the lines by pressing 'CTRL + K' in nano. and copy-paste them with the ones provided above to you.

Press 'CTRL + X', to exit. Prompts to save - Press 'Y' to save.

Type cat /etc/apt/sources.list to double-check if they are correct.

Then do a sudo apt update && sudo apt upgrade -y Hopefully should have fixed your issues after this.

8
  • I am reading the sources.list file and I am thinking that the problem may come from that I upgraded the OS version from 16.04 to 18.04. I come to this conclusion because I find lines about "xenial", which I am certain refers to the 16.04 version. Should I copy-paste it?
    – HyHyHyena
    Oct 11, 2018 at 12:04
  • Yes your right, if its xenial then its 16.04 version's repo's. Change them to bionic and see if it works? or simply copy paste them into your sources.list which i mentioned above. Good luck!
    – Shaze
    Oct 11, 2018 at 12:13
  • 1
    It totally worked! I am very grateful for I shall not be afraid of security issues!
    – HyHyHyena
    Oct 11, 2018 at 12:26
  • I'm glad it all worked fine for you ;)
    – Shaze
    Oct 11, 2018 at 12:32
  • 2
    I strongly discourage deleting the file sudo rm -rf /etc/apt/souces.list and adding all the repo's mentioned above. Rather I'll suggest opening Software and Updates app, selecting the updates you want to receive or changing server in order to refresh the list. This would be easy and OP can add repository he really needs instead of all.
    – Kulfy
    Oct 11, 2018 at 14:29
0

I am a light user of Ubuntu 20.04 and I recently installed Python 3.9.5 and afterwards executed:

$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 2

Python 3.9.5 ran just fine. But the Software Updater hung and it didn't start at all after several reboots. So I looked at the suggested solution above. Everything in sources.list correctly refers to Focal Fossa. Next I got this on my terminal:

$ sudo apt update && sudo apt upgrade -y
Hit:1 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu focal InRelease
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease                                   
Hit:3 http://de.archive.ubuntu.com/ubuntu focal InRelease                                        
Hit:4 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease          
Hit:5 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 11, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

I have no idea what happened or why my OS is now somehow broken. Any help appreciated.

UPDATE (minutes later):

Searching for the "No module named 'apt_pkg'" error I came across the following link: https://unix.stackexchange.com/questions/588066/modulenotfounderror-no-module-named-apt-pkg-appears-in-various-commands

And since I had only installed Python 3.9.5, I thought the following "answer" (posted in the link above) might help:

sudo apt remove python3-apt
sudo apt autoremove
sudo apt autoclean
sudo apt install python3-apt

Now ... on booting Ubuntu 20.04 LTS, I get the logon screen but no further: neither of my mice (that always worked) functions. It mentioned that it has installed my printer (yet again?). I am unable to log in. I am totally locked out of Ubuntu (on a dual boot PC with GRUB2).

How can installing another Python version be so disasterous? I did not execute any hazardous commands like editing a system file or play with symlinks I'll have to reinstall Ubuntu from scratch again. And I am no wiser.

Side Note: I have worked with operating systems since PS/8, DOS and RSX-11D. But this sucks! (pardon me please)

-1

Had the same problem. The following command solved it.

sudo apt purge update-manager && sudo apt install update-manager

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .