sudo apt install neofetch
[sudo] password for gh:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
gh@gh-Lenovo-Z580:~$ sudo dpkg --configure -a
Setting up openafs-modules-dkms (1.8.4~pre1-1ubuntu2.1) ...
Loading new openafs-1.8.4pre1 DKMS files...
Building for 5.8.0-59-generic
Building initial module for 5.8.0-59-generic
Secure Boot not enabled on this system.
Done.
openafs.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.8.0-59-generic/updates/dkms/
depmod...........
DKMS: install completed.
Setting up openafs-client (1.8.4~pre1-1ubuntu2.1) ...
update-alternatives: using /usr/bin/pagsh.openafs to provide /usr/bin/pagsh (pagsh) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/openafs-client.service → /lib/systemd/system/openafs-client.service.
Created symlink /etc/systemd/system/remote-fs.target.wants/openafs-client.service → /lib/systemd/system/openafs-client.service.
Job for openafs-client.service failed because the control process exited with error code.
See "systemctl status openafs-client.service" and "journalctl -xe" for details.
invoke-rc.d: initscript openafs-client, action "start" failed.
● openafs-client.service - OpenAFS client
Loaded: loaded (/lib/systemd/system/openafs-client.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-07-05 00:48:14 BST; 10ms ago
Process: 86158 ExecStartPre=/usr/share/openafs/openafs-client-precheck (code=exited, status=0/SUCCESS)
Process: 86173 ExecStart=/sbin/afsd $AFSD_ARGS (code=exited, status=1/FAILURE)
Process: 86178 ExecStopPost=/sbin/rmmod $KMOD (code=exited, status=0/SUCCESS)
Jul 05 00:48:14 gh-Lenovo-Z580 systemd[1]: Starting OpenAFS client...
Jul 05 00:48:14 gh-Lenovo-Z580 afsd[86173]: afsd: some file missing or bad in /etc/openafs/
Jul 05 00:48:14 gh-Lenovo-Z580 systemd[1]: openafs-client.service: Control process exited, code=exited, status=1/FAILURE
Jul 05 00:48:14 gh-Lenovo-Z580 systemd[1]: openafs-client.service: Failed with result 'exit-code'.
Jul 05 00:48:14 gh-Lenovo-Z580 systemd[1]: Failed to start OpenAFS client.
dpkg: error processing package openafs-client (--configure):
installed openafs-client package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.7) ...
Errors were encountered while processing:
openafs-client
我做错了什么?
答案1
看起来您在运行无人值守升级时关闭了机器或者手动终止了 APT 进程。
要从头开始,您可以通过以下方式删除所有 OpenAFS 包:
sudo apt-get autopurge '*openafs*'
如果以上失败,则使用较低级别:
sudo dpkg -P --force-all $(dpkg -l | grep -i openafs | awk '{print $2}')
然后通过以下方式恢复其他软件包的安装
sudo dpkg --configure -a
sudo apt-get install -f
最后安装 neofetch 和 OpenAFS 客户端
sudo apt-get install neofetch openafs-client