请问系统升级失败(提示一些服务未启动)怎么搞定?

這裏是詳細信息,親測apt-get -f install解決不了,不過好像也不是依賴問題,好像是服務出問題了(以上是樓主的猜測)
謝謝
root@msy-pc:/home/msy# apt-get dist-upgrade -f
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
正在对升级进行计算… 完成
下列软件包是自动安装的并且现在不需要了:
libgsoap8
使用’sudo apt autoremove’来卸载它(它们)。
下列软件包将被升级:
live-config-systemd
升级了 1 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 0 B/21.5 kB 的软件包。
解压缩后将会空出 1,024 B 的空间。
您希望继续执行吗? [Y/n]
(正在读取数据库 … 系统当前共安装有 155890 个文件和目录。)
正准备解包 …/live-config-systemd_5.20160608_all.deb …
Failed to stop live-config.service: Unit live-config.service not loaded. //樓主說的就是這一句
dpkg: 警告: 子进程 旧的 pre-removal 脚本 返回错误状态 5
dpkg: 现在尝试使用新软件包所带的脚本…
Failed to stop live-config.service: Unit live-config.service not loaded. //這一句
dpkg: 处理归档 /var/cache/apt/archives/live-config-systemd_5.20160608_all.deb (–unpack)时出错:
子进程 新的 pre-removal 脚本 返回错误状态 5
Failed to get unit file state for live-config.service: No such file or directory
live-config.service is a disabled or a static unit, not starting it. //以及這两句
在处理时有错误发生:
/var/cache/apt/archives/live-config-systemd_5.20160608_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@msy-pc:/home/msy#

以下是一些系统信息(因为我启用了混合架构所以我就全粘上来了):
Linux msy-pc 4.4.0-2-deepin-amd64 #1 SMP Deepin 4.4.6-4 (2016-07-01) x86_64 GNU/Linux
Distributor ID: Deepin
Description: Deepin 15.2
Release: 15.2
Codename: jessie
ii libc-bin 2.22-9 amd64 GNU C Library: Binaries
ii libc-dev-bin 2.22-9 amd64 GNU C Library: Development binaries
ii libc-l10n 2.22-9 all GNU C Library: localization files
ii libc6:amd64 2.22-9 amd64 GNU C Library: Shared libraries
ii libc6:i386 2.22-9 i386 GNU C Library: Shared libraries
ii libc6-dev:amd64 2.22-9 amd64 GNU C Library: Development Libraries and Header Files
ii libc6-i386 2.22-9 amd64 GNU C Library: 32-bit shared libraries for AMD64
ii libpam-systemd:amd64 229-4 amd64 system and service manager - PAM module
ii libsystemd0:amd64 229-4 amd64 systemd utility library
ii libsystemd0:i386 229-4 i386 systemd utility library
ii live-config-systemd 5.0~a6-1 all Live System Configuration Components (systemd backend)
ii systemd 229-4 amd64 system and service manager
ii systemd-sysv 229-4 amd64 system and service manager - SysV links
关于sources.list我害怕又出幺蛾子麻烦就一直用的图形界面带的更新没动过,里面就这么两句

Generated by deepin-installer

deb [by-hash=force] packages.deepin.com/deepin unstable main contrib non-free
#deb-src packages.deepin.com/deepin unstable main contrib non-free
图形界面显示是“官方CDN(加速)源”

用手机暂时不方便搜索帮你解决问题,不过你得具体系统版本,内核版本,包管理器版本,systemd版本,libc版本,还有你的sources.list配置,先贴出来看看吧

唔唔,好到,请稍等片刻,我直接编辑主贴吧。

[quote=“wsMwT”]

唔唔,好到,请稍等片刻,我直接编辑主贴吧。[/quote]

好~

  1. 执行以下指令
  1. 执行以下指令将结果全部复制贴上来

[code]# systemctl stop live-config.service

systemctl start live-config.service

systemctl status live-config.service

cat /var/log/syslog | pastebinit[/code]

[quote=“vickycq”]1. 执行以下指令

  1. 执行以下指令将结果全部复制贴上来

[code]# systemctl stop live-config.service

systemctl start live-config.service

systemctl status live-config.service

cat /var/log/syslog | pastebinit[/code][/quote]

他现在这个状态没法运行 apt install 啦

[quote=“hosiet”]

[quote=“vickycq”]1. 执行以下指令

  1. 执行以下指令将结果全部复制贴上来

[code]# systemctl stop live-config.service

systemctl start live-config.service

systemctl status live-config.service

cat /var/log/syslog | pastebinit[/code][/quote]

他现在这个状态没法运行 apt install 啦[/quote]

哈哈,其实是可以运行的

[quote=“Mithrandir”]

唔唔,好到,请稍等片刻,我直接编辑主贴吧。好~[/quote]

编辑好了! :smiley:

[quote=“vickycq”]1. 执行以下指令

  1. 执行以下指令将结果全部复制贴上来

[code]# systemctl stop live-config.service

systemctl start live-config.service

systemctl status live-config.service

cat /var/log/syslog | pastebinit[/code][/quote]

唔唔,在这里了(全fail啊。。。)

root@msy-pc:/home/msy# systemctl stop live-config.service Failed to stop live-config.service: Unit live-config.service not loaded. root@msy-pc:/home/msy# systemctl start live-config.service Failed to start live-config.service: Unit live-config.service not found. root@msy-pc:/home/msy# systemctl status live-config.service ● live-config.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) root@msy-pc:/home/msy# cat /var/log/syslog | pastebinit Traceback (most recent call last): File "/usr/bin/pastebinit", line 348, in <module> content = sys.stdin.read() File "/usr/lib/python3.5/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 7822235: invalid start byte root@msy-pc:/home/msy#

这个论坛的诸位好生热情啊XD好开森

窝认为应该是可以的。貌似只是 configure 过程被打断,运行 dpkg --configure -a 来配置未配置的软件包
如果无法运行 apt install,将 /var/log/syslog 或 journalctl 最后相关信息贴上来 或 贴到 paste.ubuntu.com
:smiley: :slight_smile: :wink:

[quote=“wsMwT”]root@msy-pc:/home/msy# systemctl start live-config.service
Failed to start live-config.service: Unit live-config.service not found.
root@msy-pc:/home/msy# systemctl status live-config.service
● live-config.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
[/quote]

看来问题跟我想的不太一样…等其它网友回答吧 :laughing:

执行以下指令将结果全部复制贴上来…看看?

apt-get -f install dpkg --configure -a

看来问题跟我想的不太一样…等其它网友回答吧 :laughing:

执行以下指令将结果全部复制贴上来…看看?

apt-get -f install dpkg --configure -a[/quote]

额。。我觉得不用粘了。。。apt-get -f install一切正常,dpkg --configure -a更是一句提示提示语都没有。。。

root@msy-pc:/home/msy# dpkg --configure -a root@msy-pc:/home/msy# apt-get -f install 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libgsoap8 使用'sudo apt autoremove'来卸载它(它们)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 1 个软件包未被升级。 root@msy-pc:/home/msy#

移除 live-config-systemd。若需要,再重新安装 live-config-systemd?

说明全部 configure 妥了。

[quote=“vickycq”]移除 live-config-systemd。若需要,再重新安装 live-config-systemd?

说明全部 configure 妥了。[/quote]

我竟然卸载不掉,哭笑不得。。。还是那个奇怪的服务。。

root@msy-pc:/home/msy# apt remove live-config-systemd && apt install live-config-systemd 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libgsoap8 使用'sudo apt autoremove'来卸载它(它们)。 下列软件包将被【卸载】: live-config live-config-systemd 升级了 0 个软件包,新安装了 0 个软件包,要卸载 2 个软件包,有 0 个软件包未被升级。 解压缩后将会空出 165 kB 的空间。 您希望继续执行吗? [Y/n] (正在读取数据库 ... 系统当前共安装有 155963 个文件和目录。) 正在卸载 live-config (5.20160608) ... 正在卸载 live-config-systemd (5.0~a6-1) ... Failed to stop live-config.service: Unit live-config.service not loaded. dpkg: 处理软件包 live-config-systemd (--remove)时出错: 子进程 已安装 pre-removal 脚本 返回错误状态 5 Failed to get unit file state for live-config.service: No such file or directory live-config.service is a disabled or a static unit, not starting it. 在处理时有错误发生: live-config-systemd E: Sub-process /usr/bin/dpkg returned an error code (1) root@msy-pc:/home/msy#

如果不存在 /lib/systemd/system/live-config.service
[code]apt install --reinstall live-config-systemd[/code]

如果不存在 /lib/systemd/system/live-config.service

[quote=“vickycq”]find /lib/systemd | grep live-config.service
如果不存在 /lib/systemd/system/live-config.service

一样的错误。。。

要不暴力卸载好了 dpkg force yes

[code]$ wget -O live-config.service https://paste.debian.net/plain/788249

cp live-config.service /lib/systemd/system

systemctl daemon-reload

apt install --reinstall live-config-systemd

[/code]

[quote=“vickycq”][code]$ wget -O live-config.service https://paste.debian.net/plain/788249

cp live-config.service /lib/systemd/system

systemctl daemon-reload

apt install --reinstall live-config-systemd

[/code][/quote]

谢谢,成功解决了!

[code]root@msy-pc:/home/msy# wget -O live-config.service https://paste.debian.net/plain/788249
–2016-08-11 20:47:28-- https://paste.debian.net/plain/788249
正在解析主机 paste.debian.net (paste.debian.net)… 78.47.227.179
正在连接 paste.debian.net (paste.debian.net)|78.47.227.179|:443… 已连接。
已发出 HTTP 请求,正在等待回应… 200 OK
长度:未指定 [text/plain]
正在保存至: “live-config.service”

live-config.servi <=> ] 630 --.-KB/s in 0s

2016-08-11 20:47:40 (6.34 MB/s) - “live-config.service” 已保存 [630]

root@msy-pc:/home/msy# cp live-config.service /lib/systemd/system
root@msy-pc:/home/msy# systemctl daemon-reload
root@msy-pc:/home/msy# apt install --reinstall live-config-systemd
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
下列软件包是自动安装的并且现在不需要了:
libgsoap8
使用’sudo apt autoremove’来卸载它(它们)。
下列软件包将被升级:
live-config-systemd
升级了 1 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 0 B/21.5 kB 的软件包。
解压缩后将会空出 1,024 B 的空间。
(正在读取数据库 … 系统当前共安装有 155915 个文件和目录。)
正准备解包 …/live-config-systemd_5.20160608_all.deb …
正在将 live-config-systemd (5.20160608) 解包到 (5.0~a6-1) 上 …
正在设置 live-config-systemd (5.20160608) …
Created symlink from /etc/systemd/system/basic.target.wants/live-config.service to /lib/systemd/system/live-config.service.
root@msy-pc:/home/msy# apt-get dist upgrade
E: 无效的操作 dist
root@msy-pc:/home/msy# apt-get dist-upgrade
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
正在对升级进行计算… 完成
下列软件包是自动安装的并且现在不需要了:
libgsoap8
使用’sudo apt autoremove’来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
root@msy-pc:/home/msy#
[/code]