Ok... I was ablle to fix the problem with much research and scrapping 5 or 6
virtual machine builds of Ubuntu 18.04.
I am writing this for myself and anyone else who runs into the same problem.
Since i saw your message in my inbox i decided to try and replicate the
incident and walk through the fix so you can try it for yourself.
Ultimately what helped me was the "SYNAPTIC" package manager. But you
won't be able to install it right out the box.
1. I downloaded and installed a new Ubuntu 18.04 OS vitual machine.
# I am doing this on Windows Hyper-V. I tried it on Virtual
box but i did not experience the same issue.
# I am mainly using Hyper-V to create an isolated development
environment, with docker, IDE, etc... (It works great once you get it working
right)
2. When the OS loads for the first time you get the welcome screen.
# Close out of it because Livepatch never worked for me out of
the box. I had to connect after i got everything setup.
# You can right click the sprocket icon on the favorites panel
and quit.
3. First things first we need to update in order to be able to install
"synaptic" package manager.
~$ sudo apt update -y
~$ sudo apt install synaptic -y
# If the default updater launches, just select "remind me
later," we will set that up later.
4. Go to your application dock and open "Synaptic" package manager.
# Make sure you close out of the terminal window and anything
you may have running. We will use it again soon.
====================================================================================================================================
***I missed a step while i was replicating the problem and had
to figure out what i needed to do to unlock the frontend and apt in order to
use the Terminal.***
# I was supposed to remove and reinstall "snapd" before running
the upgrade from "Synaptic" but i will share the error i made below.
*** AT ANY TIME YOU GET HUNGUP, you can kill the process or
program holding or locking up package manager apt by using:
# After running the upgrade out of sequence before i completely
removed "snapd" i got locked up again. After I closed "Synaptic" I went to the
terminal to do a manual removal and this is what
happened and what i did to get out of a
locked-frontend.
~$ sudo apt remove snapd
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11:
Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock
(/var/lib/dpkg/lock-frontend), is another process using it?
~$ sudo fuser [path to process locked] <== This will
help you find out the PID of the package holding up the frontend.
Example: If ou get locked up when upgrading or updating use
"Ctrl + C" to get out and these steps will help you get unstuck
~$ sudo fuser /var/lib/dpkg/lock-frontend
/var/lib/dpkg/lock-frontend: 14515 <== That is the process
ID for the package holding up the frontend. Now use it to kill the process
~$ sudo kill -9 14515
E: dpkg was interrupted, you must manually run 'sudo dpkg
--configure -a' to correct the problem. # Now you must run "sudo dpkg
--configure -a"
~$ sudo dpkg --configure -a
# The last lined should tell you why we need to reinstall
snapd.
Processing triggers for dbus (1.12.2-1ubuntu1.1) ...
Errors were encountered while processing:
snapd
gnome-software-plugin-snap
# So we need to completely remove both these packages and do a
complete reinstallation of them.
# Reopen "Synaptic" so we can fix the problem.
======================================================================================================================================
a. On the left panel you will see several options above
and below.
# Select the option for "Status"
# You will notice above you have several options,
"All, Installed, Installed (auto removable), Installed (manual), Installed
(upgradable), Not Installed and Not Installed (residual config)."
# This will be your new best friend for
troubleshoot system problems left behind by deleted or removed packages that
leave behind buggy "residual config files" or dependencies marked for "auto
removable."
# We will be removing dependencies and residual
config files first.
# Before we do this I want you to: Go to =>
Settings => Preferences => Select the checkbox "Apply changes in a terminal
window." => Select Apply and OK.
b. Select => "Status" form the bottom left panel and
Select => "Not Installed (residual config)" from the left column above
# Hit the checkbox next to all the packages and select
"Mark for Complete Removal"
# When you are done select "Apply" on the top Icon.
Confirm your choice to remove and lets move on to the next step.
c. We have quite a few package installed that are marked
for "Installed (auto removable)", so lets do that next.
# Select any one package and hit "Ctrl + A" => Right
click the highlighted area and => Select "Mark for Complete Removal"
# Select apply and the terminal window should open
showing you the removal process.
# Close the window when you are done.
***Don't forget to search for "snapd" and do a complete
removal, it will also remove "gnome-software-plugin-snap
d. You will have to reinstall "snapd" and
"gnome-software-plugin-snap" will come with it. Open up the desktop package
manager and restart the plugins. ***A message will appear on the screen
telling you this***
e. Now we will use "Synaptic" to update our remaining packages
without the buggy dependencies and residual config files.
# Select "Installed (upgradable)" from the left panel,
Right click any package on the right panel and select => "Upgrade";
# You will need to reboot your virtual machine now.
Just to make sure all changes have taken affect.
~$ sudo reboot
# When it comes back up; open a Terminal and run:
~$ sudo apt update -y
~$ sudo apt upgrade -y
5. At his point you should be able to login to "Livepatch" and get
up-to-date security updates. If you open the updater software it will tell
you, your system is up-to-date.
# Remember to go into "Synaptic" everytime you need to uninstall a
package. Because "apt remove" does not always remove config files or
dependencies. Synaptic will show you any dependencies or config files that
remain for removal.
# At this point your system should be read to go
6. Here are a few useful packages you may want to install
~$ sudo apt install locate -y # It will help
you search any file or directory by keyword search. A very helpful tool when
looking for packages or files in your directories.
I hope this will help someone with the same problems i had getting my first
Ubuntu VM up and running.
Thanks for all you do! Like copper is to electricity, we are to
knowledge!
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1835102
Title:
md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: no such file or
directory
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1835102/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs