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
It stops in the highlighted step, as shown in image image
Can any one help?
Closed: Reinstalled 16.04 and upgraded
2 Answers
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 *; 7This 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.
17