0

I have Ubuntu 16.04 and I encounter problems related to snapd and ubuntu-snappy-cli. When I run the following commands, I get errors that are displayed below.

Running $ sudo apt upgrade results:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up snapd (2.29.4.2~14.04) ...
Failed to execute operation: No such file or directory
dpkg: error processing package snapd (--configure):
  subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-snappy-cli:
  ubuntu-snappy-cli depends on snapd; however:
    Package snapd is not configured yet.

dpkg: error processing package ubuntu-snappy-cli (--configure):
  dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.                                                                                                              

Errors were encountered while processing:
  snapd
  ubuntu-snappy-cli
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running $ sudo apt -f install results:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up snapd (2.29.4.2~14.04) ...
Failed to execute operation: No such file or directory
dpkg: error processing package snapd (--configure):
  subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-snappy-cli:
  ubuntu-snappy-cli depends on snapd; however:
    Package snapd is not configured yet.

dpkg: error processing package ubuntu-snappy-cli (--configure):
  dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

Errors were encountered while processing:
  snapd
  ubuntu-snappy-cli
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running $ sudo dpkg --configure -a results:

dpkg: dependency problems prevent configuration of ubuntu-snappy-cli:
  ubuntu-snappy-cli depends on snapd; however:
    Package snapd is not configured yet.

dpkg: error processing package ubuntu-snappy-cli (--configure):
  dependency problems - leaving unconfigured
Errors were encountered while processing:
  ubuntu-snappy-cli

Running $ sudo apt-get --remove purge snapd results:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cgroup-lite linux-generic-lts-xenial linux-headers-generic-lts-xenial linux-image-generic-lts-xenial
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  snapd* ubuntu-snappy-cli*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 77.1 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 276188 files and directories currently installed.)
Removing ubuntu-snappy-cli (2.29.4.2~14.04) ...
Removing snapd (2.29.4.2~14.04) ...
Failed to stop snapd.autoimport.service: Unit snapd.autoimport.service not loaded.
Failed to stop snapd.socket: Unit snapd.socket not loaded.
Failed to stop snapd.service: Unit snapd.service not loaded.
dpkg: error processing package snapd (--purge):
  subprocess installed pre-removal script returned error exit status 5
Errors were encountered while processing:
  snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
1

You actually want to remove the other package that has the problem.

sudo apt-get remove --purge ubuntu-snappy-cli

and put back snapd

sudo apt-get install snapd

| improve this answer | |
  • Actually, when I run sudo apt-get remove --purge ubuntu-snappy-cli, I get the same error: ... Setting up snapd (2.29.4.2~14.04) ... Failed to execute operation: No such file or directory ... – Masroor Feb 26 '18 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.