Ubuntu 16.04 中的 snapd 和 ubuntu-snappy-cli 问题

Ubuntu 16.04 中的 snapd 和 ubuntu-snappy-cli 问题

我有Ubuntu 16.04我遇到的问题snapdubuntu-snappy-cli。当我运行以下命令时,出现如下所示的错误。

运行$ sudo apt upgrade结果:

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)

运行$ sudo apt -f install结果:

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)

运行$ sudo dpkg --configure -a结果:

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

运行$ sudo apt-get --remove purge snapd结果:

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

你实际上想要删除其他有问题的软件包。

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

然后放回 snapd

sudo apt-get install snapd

相关内容