apt install 的问题:“子进程返回错误代码”

apt install 的问题:“子进程返回错误代码”

背景:尝试安装 AVG,搞砸了,不得不手动从 /bin 等中删除文件等

现在,当我运行 apt-get update、apt-install 或 apt 时,我会得到以下返回

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  fancontrol read-edid i2c-tools
The following NEW packages will be installed:
  lm-sensors
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
1 not fully installed or removed.
Need to get 87.4 kB of archives.
After this operation, 406 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 lm-sensors amd64 1:3.6.0-2ubuntu1 [87.4 kB]
Fetched 87.4 kB in 1s (70.2 kB/s)     
Selecting previously unselected package lm-sensors.
(Reading database ... 163608 files and directories currently installed.)
Preparing to unpack .../lm-sensors_1%3a3.6.0-2ubuntu1_amd64.deb ...
Unpacking lm-sensors (1:3.6.0-2ubuntu1) ...
Setting up lm-sensors (1:3.6.0-2ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lm-sensors.service → /lib/systemd/system/lm-sensors.service.
Setting up avg2013flx (2013.3118) ...
chown: cannot access '/opt/avg/av': No such file or directory
dpkg: error processing package avg2013flx (--configure):
 installed avg2013flx 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.13) ...
Errors were encountered while processing:
 avg2013flx
E: Sub-process /usr/bin/dpkg returned an error code (1)

从这种情况发生的频率来看,AVG 一定在我的 apt 参考 sources.list 中。查看后,没有与 AVG 相关的内容。还有其他 apt 可从中提取的列表吗?我该如何阻止此错误再次出现?

答案1

您必须手动创建此目录

sudo mkdir -p /opt/avg/av

然后继续安装

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

还建议对已删除的文件进行更全面的检查。您必须安装 debsums 并按如下方式运行它:

sudo apt-get install debsums
sudo debsums_init
sudo debsums -a -c -s

然后通过如下命令手动重新安装提到的包
sudo apt-get install --reinstall htop

相关内容