0

I am facing issues in upgrading ubuntu from 16.04 LTS to 18.04 LTS. I followed all online sources but could not pass through the initial stages

Got the following error when I tried from the terminal

$ /usr/lib/ubuntu-release-upgrader/check-new-release-gtk
/usr/lib/ubuntu-release-upgrader/check-new-release-gtk:30: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
from gi.repository import Gtk

tried all possible help online

Link1 Link2 Link3

It stops in the highlighted step, as shown in image image

Can any one help?

Closed: Reinstalled 16.04 and upgraded

2

Step 1: Upgrade the packages to the latest version for 16.04 decreases the chance of something going wrong during the upgrade to version 18.04. Run the command below

sudo apt update && sudo apt upgrade

Step 2: Install the Ubuntu Update Manager.

sudo apt install update-manager-core

Step 3: Upgrade Ubuntu

sudo do-release-upgrade

After you enter the upgrade command, you will be asked to confirm that you want to update via SSH. Type Y to continue.

Step 4: After the upgrade is complete, a restart will be required.

Step 5:To check what version of Ubuntu is currently installed, use the command below.

lsb_release -a

Edit:

You will have to remove the PPA which were added to the system

Step 1: List the PPAs

find /etc/apt/sources.list.d -type f -name "*.list" -print0 | \
    while read -d $'\0' file; do awk -F/ '/deb / && /ppa\.launchpad\.net/ {print "sudo ppa-purge ppa:"$4"/"$5}' "$file"; done

Step 2: Now, remove them

find /etc/apt/sources.list.d -type f -name "*.list" -print0 | \
    while read -d $'\0' file; do awk -F/ '/deb / && /ppa\.launchpad\.net/ {system("sudo ppa-purge ppa:"$4"/"$5)}' "$file"; done

Step 3: Install bleachbit and gtkorphan

sudo apt install bleachbit
sudo apt install gtkorphan

Step 4: Run bleachbit and gtkorphanas root

Step 5: Now, run the command

sudo do-release-upgrade

Edit

Step 1: Edit apt configuration

Press Ctrl Alt T to open terminal Now, type

sudo nano /etc/apt/apt.conf

Step 2: Change the config:

APT::Default-Release *;

Note If the apt.conf file does not exist, create your own user file in /etc/apt/apt.conf.d so you can guarantee that it won't be overwritten by package updates. Use the command to create the file

sudo touch /etc/apt/apt.conf.d/apt.conf

Then to edit your file run

sudo nano /etc/apt/apt.conf.d/apt.conf

Add this line to thee file

 APT::Default-Release *;
| improve this answer | |
  • I tried this earlier.. Step 3 gets Aborted – Vinod Krishnan Dec 19 '19 at 5:50
  • please share the error log – Tejas Lotlikar Dec 19 '19 at 5:50
  • here is the link – Vinod Krishnan Dec 19 '19 at 5:54
  • no hope.. getting Aborted again – Vinod Krishnan Dec 19 '19 at 6:26
  • 1
    The first method working fine for me, I just tried upgrade from 16.04 to 18.04 and it's work well. – Loc_rabbirt Apr 28 at 7:11
0

This should do what you're looking to do.

Either of these options should work.

apt full-upgrade

or

apt-get dist-upgrade

Hope this helps!

Also I would hope it goes without saying but these need to be ran as the root user. If you aren't root just use

sudo su root

------ UPDATE -------

sudo su root

cd /usr/lib/ubuntu-release-upgrader

Look for a file with a name similar to

check-new-release-gtk:30:

Look for

import gi

gi.require_version("Gtk", "3.0")

from gi.repository import Gtk

The version requirement may not be there. If it isn't we need to add it.

------ UPDATE ------

Try this ...

sudo do-release-upgrade

 sudo apt-get update --fix-missing; sudo dpkg --configure -a; sudo apt-get install -f; sudo apt-get update; sudo apt-get upgrade;

sudo do-release-upgrade

After a bit of research I found this answer on an older post from last year. The wording was a bit different.

https://ubuntuforums.org/showthread.php?t=2391552

| improve this answer | |
  • I tried all these – Vinod Krishnan Dec 19 '19 at 6:19
  • Does it yield any error message? – Taux1c Dec 19 '19 at 6:21
  • Aside from the one above I mean. – Taux1c Dec 19 '19 at 6:22
  • Can you run "apt update" and post the results in an edit please. I believe we need to manually upgrade python and then upgrade the rest of the system. – Taux1c Dec 19 '19 at 6:26
  • <pre>Get:3 us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Hit:4 archive.ubuntu.com/ubuntu xenial InRelease Get:5 security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:6 us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Fetched 252 kB in 0s (280 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. <pre> – Vinod Krishnan Dec 19 '19 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.