2

I am on Ubuntu 18.04LTS. When I run sudo apt update, the result shows 4 packages can be upgraded. Run 'apt list --upgradable' to see them.

But, when I run sudo apt upgrade it shows

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

When I run sudo apt dist-upgrade or sudo apt full-upgrade it shows the same result. I found this question and could not find the answer why the packages not upgraded.How to resolve this? found this question with no answer

When I run sudo apt list --upgradable it shows the following

$ sudo apt list --upgradable
Listing... Done
python3-distutils/bionic,bionic 3.6.9-1~18.04 all [upgradable from: 3.6.7-1~18.04]
python3-gdbm/bionic 3.6.9-1~18.04 amd64 [upgradable from: 3.6.7-1~18.04]
python3-lib2to3/bionic,bionic 3.6.9-1~18.04 all [upgradable from: 3.6.7-1~18.04]
python3-tk/bionic 3.6.9-1~18.04 amd64 [upgradable from: 3.6.7-1~18.04]

When run sudo apt full-upgrade it shows,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

When try to manually install packages it shows this error

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-distutils : Depends: python3 (>= 3.6.8-1~) but 3.6.7-1~18.04 is to be installed
 python3-gdbm : Depends: python3 (>= 3.6.8-1~) but 3.6.7-1~18.04 is to be installed
 python3-lib2to3 : Depends: python3 (>= 3.6.8-1~) but 3.6.7-1~18.04 is to be installed
 python3-tk : Depends: python3 (>= 3.6.8-1~) but 3.6.7-1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

Output of apt-cache policy python3-distutils:

python3-distutils:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.9-1~18.04
  Version table:
     3.6.9-1~18.04 500
        500 http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu bionic/main amd64 Packages
        500 http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu bionic/main i386 Packages
     3.6.8-1~18.04 500
        500 http://lk.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://lk.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
 *** 3.6.7-1~18.04 100
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://lk.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://lk.archive.ubuntu.com/ubuntu bionic/main i386 Packages
Kulfy
  • 17,696
  • Does this happen every day? Or is it occasional? – user535733 Sep 21 '19 at 16:58
  • Please edit your question and post the output of the following command: apt list --upgradable – mchid Sep 21 '19 at 17:07
  • Neither of your two links seems related to your question. One is about stale login (motd) messages, the other is a clearly corrupted or broken system. – user535733 Sep 21 '19 at 17:23
  • @user535733 this happens most of the times. – Nuwan Thisara Sep 21 '19 at 17:27
  • Please edit your question to show the complete output of the following command: sudo apt full-upgrade – user535733 Sep 21 '19 at 17:28
  • 2
    I can't find version 3.6.9-1~18.04 anywhere. Run sudo apt clean; sudo apt update and see if it says the same thing. Also, if you have any ppas installed, please include this in your question. – mchid Sep 21 '19 at 17:45
  • 2
    Did you add an extra repository or a ppa? The required version of python3 is not available through the normal 18.04 repositories, extra universe, multiverse, backports, etc. The required version of python3 may not be published yet. Also, I have updated the answer. – mchid Sep 21 '19 at 18:38
  • @mchid I followed your answer but no success – Nuwan Thisara Sep 22 '19 at 05:06
  • @NuwanThisara What do you get after running apt-cache policy python3-distutils? – Kulfy Sep 22 '19 at 08:24
  • @Kulfy I get https://gist.github.com/nuwanlk/6131736537207c55a8921aeb235c8584 – Nuwan Thisara Sep 22 '19 at 10:58

1 Answers1

0

I cannot answer why this is happening but there are a few things you can do to either resolve the issue or upgrade the packages to the newest version.

First, run the following command to clear your cache and upgrade:

sudo apt clean
sudo apt update
sudo apt dist-upgrade

If that does not work, run the following commands to explicitly install the packages (however, be careful to read the changes before you accept the changes because the system may want to uninstall some packages and this may not be what you want to do):

sudo apt install python3-distutils python3-gdbm python3-lib2to3 python3-tk

Now, if you run into an impossible situation or if there is a problem with dependencies, please edit your question and post the errors. Thanks!


UPDATE

Run the following command to see what version of python3 is installed and then try the installation again:

sudo apt install python3
sudo apt install python3-distutils python3-gdbm python3-lib2to3 python3-tk

If you still have the problem it is because the ppa or extra repository you are using has not published the required version of python3 yet. Most likely, the extra version will be available soon.

mchid
  • 43,546
  • 8
  • 97
  • 150
  • says, python3 is already the newest version (3.6.7-1~18.04) – Nuwan Thisara Sep 22 '19 at 02:44
  • 1
    -1 Answers should be actual solutions, not just hints. Clarifications should be asked in comments. – fkraiem Sep 22 '19 at 06:28
  • 1
    @fkraiem these are more than hints. They are multiple possible solutions. Yes, they didn't work in this case, but there was no way of knowing without trying them and they could help someone else with a similar issue. – terdon Sep 22 '19 at 10:56
  • @NuwanThisara http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu bionic/main is the culprit. – Kulfy Sep 22 '19 at 12:45
  • @Kulfy You are exactly correct. I removed that source from the list and software instantly updated. If you wish you can add this an answer so that I can accept it. Please explain why this happened. Thank you – Nuwan Thisara Sep 22 '19 at 13:31
  • ppa problem. Remove it with ppa-purge – nobody Sep 23 '19 at 13:03