md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: no such file or directory

Bug #1835102 reported by Dellius Alexander
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello all,

I am new to the linux world. I started using the WSL command line version at first on Windows. I recently learned of Microsoft and Canonical partnership and the prebuilt Hyper-v Quick create version of Ubuntu. So I install the Ubuntu 18.04.2 LTS version on my Windows 10 pro machine. Upon update it ran into a bug and i am unable to resolve the issue. Please Help..

The error occurs when:

     Setting up snapd (2.39.2+19.04)
     Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine real ...
     md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory snapd.failure.service is a
     disabled or static unit, not starting it.
     snapd.snap-repair.service is a disabled or static unit, not starting it.

After this message the update process just stops and freezes in the console.

What do i do to fix this issue? I MAY HAVE TO SCRAP THE IDEA OF USING UBUNTU ALL TOGETHER.

Thanks,

Dellius

Tags: snapd
affects: ubuntu-docs (Ubuntu) → snapd (Ubuntu)
Revision history for this message
Mike Castro Demaria (mcd-g) wrote :

Same for me on Ubuntu 16.04.4 LTS

# sudo apt install snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  squashfs-tools
Suggested packages:
  zenity | kdialog
The following NEW packages will be installed:
  snapd squashfs-tools
0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.
Need to get 13.1 MB of archives.
After this operation, 62.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ubuntu.mirrors.ovh.net/ubuntu xenial-updates/main amd64 squashfs-tools amd64 1:4.3-3ubuntu2.16.04.3 [105 kB]
Get:2 http://ubuntu.mirrors.ovh.net/ubuntu xenial-updates/main amd64 snapd amd64 2.39.2ubuntu0.2 [13.0 MB]
Fetched 13.1 MB in 4s (2,657 kB/s)
Selecting previously unselected package squashfs-tools.
(Reading database ... 309635 files and directories currently installed.)
Preparing to unpack .../squashfs-tools_1%3a4.3-3ubuntu2.16.04.3_amd64.deb ...
Unpacking squashfs-tools (1:4.3-3ubuntu2.16.04.3) ...
Selecting previously unselected package snapd.
Preparing to unpack .../snapd_2.39.2ubuntu0.2_amd64.deb ...
Unpacking snapd (2.39.2ubuntu0.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up squashfs-tools (1:4.3-3ubuntu2.16.04.3) ...
Setting up snapd (2.39.2ubuntu0.2) ...
md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Dellius Alexander (dalexander2israel) wrote :
Download full text (6.7 KiB)

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

  #...

Read more...

Revision history for this message
Dellius Alexander (dalexander2israel) wrote :

One more thing i forgot to add.
Using Synaptic is a little more user friendly if you have the Quick filter installed when searching for packages. Here is the steps to do so.

http://ubuntuhandbook.org/index.php/2019/01/enable-quick-filter-search-box-synaptic-package-manager/

Thanks,

Dellius

Revision history for this message
Markus (mrworta) wrote :

Found a workaround:

When update/installation is stuck, just open a second terminal and
stop snapd and snapd.socket.

# sudo systemctl stop snapd
# sudo systemctl stop snapd.socket

The installation in the first terminal should continue. After doing this, the issue didn't surface so far.

(Don't forget to start the processes again)

Cheers,
MrWorta.

Revision history for this message
Winter 2019 (winter2019) wrote :

Thank you Dellius for your hard work and caring enough to share the solution.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.