Priyanka Saggu I speak here {^_^}

Upgraded to Ubuntu 19.04!

August 6, 2019

Last night, I upgraded my host machine's operating system from Ubuntu 18.04.1 LTS to Ubuntu 19.04. In the first go, it felt nice having a new clean interface right in front, but very soon, I realised that the upgrade was a bit off, on my machine.

The problems I observed after the upgrade, and the solutions I used.

The dashtodock (or simply the *dock* that we usually see on the left side of the screen) was not scrollable/slidable. After a little search on internet regarding this, I realised that it is a bug that was spotted while updating to gnome-shell 3.31/3.32.


Further, I had lots of packages installed from non-ppa sources in the earlier version and most of them were held broken in this new upgrade (even python3.7 was also installed using some foreign sources in the earlier version. That ultimately resulted into breaking all the major python libraries like libpython3.7 as well, which literally created major problems).


I was not able to install any new packages that required "python system libraries" as it's dependencies. It all came into my sight when I was trying to install Vim and Tor browser. And it threw errors for "broken held packages" & "unmet dependencies that couldn't be installed". I spent many hours trying various solutions written on web for checking this, but nothing seemed to solve the issue.

So, the last option was to seek help in #ubuntu (on Freenode). Over there, tomreyn, so nicely volunteered me with my issues (for many hours) and pointed me towards some genuine solutions. I thank him profusely for his time and advises. :)

The solution was to look for all the foreign packages running on my machine using this script. What I will get in return is 2 categories of packages, [ No available version in archive ] and [ Newer than version in archive ].

  • For the first category, I was asked to filter for what among them are still useful and what could be removed. In case of the useful ones, I was advised to look for their PPA, or a third party APT repository, or a snap which provides these packages, to set them up again.
  • In the second section, I had packages which were also available from the repositories that I had already configured. But these packages were installed in newer versions than the APT repositories I had configured them for. So, the idea was to either downgrade these packages to the versions available in ubuntu, or uninstall them (if not needed), or configure a PPA or third party APT repository or a snap which provides these packages in these or newer versions, and set those up.

Afterwards, the only thing was to run the script again to ensure that these packages no longer appear in the search.

Thanks to the Open Source Communities, that people there tries to help us out of everything. :)


Similar thing happened with ansible as well. In that case, I had to manually clean up all the ansible directories in order to ensure that there is nothing left from the previous installs. After that, a fresh ansible installation from officially supported sources solved the issue.


The next thing was that now Nautilus no longer detects the Android phone mount in Ubuntu 19.04. So, I had to find out a way to access my phone's data on my laptop. The solution was setting up Android-File-Transfer. And the following set of commands served me well with the purpose.

# To check if 'universe' distribution component is enabled for all sources.
$ sudo add-apt-repository universe

$ sudo apt-get update
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0BB4A1B2FA1A38EB
$ sudo add-apt-repository "deb http://ppa.launchpad.net/samoilov-lex/aftl-stable/ubuntu artful main"
$ sudo apt-get update
$ sudo apt install android-file-transfer

After running the above commands, eject your phone from the USB port and remount it. Set it to Media Transfer Protocol (MPT) options, and after that, you can access all your mobile data using this command.

# And finally launch android-file-transfer with this.
$ android-file-transfer


Now, The Major Mess.

I was really curious to anyhow resolve the "unmet python-packages dependecies" issue myself. And so, I very confidently (sorry, it was my peak stupidity 😂) ran the command:

 ⚠️ ⚠️ ❌
sudo apt-get remove libpython3.7
 ⚠️ ⚠️ ❌

And I literally saw, everything vanishing from my dock in less than a minute. Everything included both the web-browsers (chrome & firefox), Ubuntu Software, Amazon store, hexchat died as well. It cleaned almost everything that ubuntu provides as it's default desktop suite. And the *major loss* was I lost the terminal as well. :(

But actually, I was really calm at the back of my mind. The reason being,

I HAD BACKUPS :D

So, in worst case, I could have wiped up this whole mess and boot it again with a new live ISO USB.

Having this thought in my mind, I very peacefuly went onto trying troubleshooting this problem. Within a 15 minutes read, I got an alternative way to get access to another shell using "Ctrl+Alt+f1" (Though, it was not the intended one, so, I tried another key groups and "Ctrl+Alt+f3" worked for me). I logged into my system through tty3 virtual console and yeah, finally, I got access to a brand new terminal.

It took me some further 4 to 5 hours to figure out what were the required set of commands for me.

*Revealing another big mistake*

Actually, I was panicked. For that very moment, seeing everything going away, I, as a stimuli reaction, pressed Ctrl+C. That stopped the process though, but in the middle of a big mess. So, now, it created another mess in a heap of mess. I had another big pile of broken packages now. 😅

Literally, no solution (for the same/similar case) on web was working for me. Because nobody had so foolishly pressed Ctrl+C in the middle of such a mess. But, still, I had false hope that I might could get a solution. The only thing I wanted back was "ubuntu-desktop". Neither "apt install" or "apt-get install" will work for me in this case, because those were pointing to a big list of broken packages now.

So, finally, after burning the whole night in searching for the solution. I came across "aptitude", the high-level interface to the package manager. Firstly, I tried my hard luck by checking if I can install the *aptitude* interface. And fortunately, It got installed.

$ sudo apt-get update
$ sudo apt-get install aptitude

I modified the prevailing solutions with *aptitude* command and it, so very prettily worked for me.

$ sudo aptitude install python3.7
$ sudo aptitude install gnome-terminal

$ sudo aptitude install ubuntu-desktop

It installed *every* required packages all by itself, therefore, by-passing all the prolonged "unmet dependencies" and "broken-packages" errors. (I was happy that I had enough data left with me for all the recovery, because it literally required lots of it, to get back (install) everything required in it's way.) And as the process was done, it ultimately redirected to my normal GUI login screen. After successfully login, I had my terminal, all the default ubuntu softwares and firefox back as usual.

Meawhile, it solved my other problem (I have mentioned above) of "not able to install packages due to python-dependencies" as well without manually filtering for the needed ones. It repaired it all by itself. *The Goal achieved* :D

[ Like we have "cherry on the cake", I had the "worst on the worst". My primary keyboard layout is Dvorak, but I actually don't use it much. So, I always switched back to qwerty. But for the whole night, in the tty virtual consoles, I was forced to type in Dvorak because there was no switching happening. And just for the information, my dvorak typing is just 3-4 wpm😅. I thank myself here, for atleast being nicely familier with the key positions. ]


This is how my newly upgraded machine looks like. 🥳 🎊

That is all about this article.

Till next time. o/