Sunday, September 2, 2018

Ubuntu 18.04 (Bionic Beaver) upgrade failure and recovery

I got Ubuntu's upgrade notification and I started upgrading my installation. For some reason I had to abort the upgrade and shut down the system which led to the corruption of entire installation. Hence, I was not able to boot the installation normally and here are the steps which I had followed to recover the system:

1. Pressing shift button when the system started led to see the boot menu and I had selected one of 
    the old recovery images.
2. sudo dpkg --configure -a
    - installed the package maintainer's version.
3. Upgraded the system from updates gui.
4. There were lots of images so I had to purge the ones which were not required:
    - sudo apt-get purge "linux-image-version_of_the_image_to_remove" (w/o quotes)
    - sudo update-grub2
5. sudo reboot
    - Pressed shift button to show the boot menu -> went to advanced options.
    - The new image and its recovery were listed. This is because of purging the old images as above.

Thursday, May 3, 2018

zlib import error in python3

I have been getting import zlib error in python3. So, after a little search on the internet, I found and did the following which had a different lib error but it resolved the error for zlib and zipfile import which I was getting earlier:

cd Python-3.6.4
make clean
sudo apt-get install zlib1g-dev
./configure
make
make test
sudo make install

And now the import zlib/ zipfile worked.