无法在 ubuntu 18.04 中升级

无法在 ubuntu 18.04 中升级
/home/bicky# 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 systemd (237-3ubuntu10.3) ...
cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of iio-sensor-proxy:
 iio-sensor-proxy depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package iio-sensor-proxy (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 systemd
 iio-sensor-proxy
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@bicky-H81M-S:/home/bicky# 

答案1

当你有,

dpkg:错误处理软件包 python3(--configure):
依赖性问题 - 未配置
处理时遇到错误:
python3
[另一个 python3 软件包]
E:子进程 /usr/bin/dpkg 返回错误代码 (1)

你需要删除.rtupdate所有python3使用

sudo rm -f /usr/share/python3/runtime.d/*

然后运行

sudo apt update
sudo dpkg --configure -a

修复python3软件包后,您会看到另一个错误输出:

Setting up systemd (237-3ubuntu10.3) ...
cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file
dpkg: error processing package systemd (--configure):
...
...
dpkg: error processing package iio-sensor-proxy (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 systemd
 iio-sensor-proxy
E: Sub-process /usr/bin/dpkg returned an error code (1)

出现输出是因为您有两个解析配置文件,要修复它,请运行

sudo rm -f /run/systemd/resolve/stub-resolv.conf
sudo dpkg --configure -a

这将再次设置您的包裹。

希望这可以帮助。

答案2

查看

在此处输入图片描述

全部删除存储库

返回启动终端命令:

sudo apt update && sudo apt upgrade

相关内容