Score:2

Issues with apt install: "sub process returned an error code"

br flag

Background: Tried installing AVG, messed up and had to manually delete files from /bin and etc etc

Now when I run apt-get update, apt-install, or apt in general I get the following return

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)

Judging by how frequent this is, AVG must be in my apt reference sources.list. After looking, nothing relating to AVG is there. Is there another list that apt pulls from? How can I stop this error from appearing again?

Score:0
zw flag

You have to create this directory manually by

sudo mkdir -p /opt/avg/av

and then resume installation

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

More comprehensive check of removed files is also recommended. You have to install debsums and run it as follows:

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

then reinstall mentioned packages manually by commands like
sudo apt-get install --reinstall htop.

BaddaBeepBaddaBoop avatar
br flag
Except I don't want to install AVG, that's why I tried removing it. I just want this error gone.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.