处理时遇到错误:/var/cache/apt/archives/snapd_2.32.9_amd64.deb

处理时遇到错误:/var/cache/apt/archives/snapd_2.32.9_amd64.deb

我是菜鸟,想从 16.04 更新到 18.04 - 但我的包管理器出现错误。即使运行sudo apt-get install -f(在阅读了我找到的一些建议后)也会导致此错误:

处理时遇到错误:/var/cache/apt/archives/snapd_2.32.9_amd64.deb E:子进程 /usr/bin/dpkg 返回错误代码 (1)

关于我该做什么来解决这个问题有什么线索吗?

谢谢你!

编辑-添加完整输出sudo apt-get install -f

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libgtkmm-2.4-1v5 linux-headers-4.13.0-36 linux-headers-4.13.0-36-generic
  linux-headers-4.4.0-117 linux-headers-4.4.0-117-generic
  linux-headers-generic-lts-xenial linux-image-4.13.0-36-generic
  linux-image-4.4.0-117-generic linux-image-extra-4.13.0-36-generic
  linux-image-extra-4.4.0-117-generic linux-image-generic-lts-xenial
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  snapd
The following packages will be upgraded:
  snapd
1 upgraded, 0 newly installed, 0 to remove and 147 not upgraded.
35 not fully installed or removed.
Need to get 0 B/14,2 MB of archives.
After this operation, 2 478 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 321112 files and directories currently installed.)
Preparing to unpack .../snapd_2.33~14.04_amd64.deb ...
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: warning: subprocess old pre-removal script returned error exit status 5
dpkg: trying script from the new package instead ...
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 archive /var/cache/apt/archives/snapd_2.33~14.04_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 5
Errors were encountered while processing:
 /var/cache/apt/archives/snapd_2.33~14.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您应该能够将其删除,ubuntu-core-launcher因为我认为它不再需要了。

sudo apt remove ubuntu-core-launcher

这可能会进一步促进您的升级。

答案2

sudo apt 删除 ubuntu-core-launcher

还会产生以下错误

正在读取软件包列表... 完成 正在构建依赖关系树
正在读取状态信息... 完成 软件包“ubuntu-core-launcher”未安装,因此未删除 您可能需要运行“apt --fix-broken install”来更正这些问题。 以下软件包具有未满足的依赖关系:default-jdk:依赖:openjdk-11-jdk 但不会安装 E:未满足的依赖关系。 尝试不使用任何软件包执行“apt --fix-broken install”(或指定解决方案)。

有什么帮助吗

相关内容