0

Sub-process /usr/bin/dpkg returned an error code (1)

A while back, I tried to upgrade Ubuntu 18.04 and I got the dpkg error as shown below.

Error

jackson
asked Oct 16, 2021
1 Answer
0

1: First Reconfigure the dpkg Package.
To do this, execute the below command:
$ sudo dpkg --configure -a
2: Remove all the Files Associated with the Package
You need to find these files which are located in the /var/lib/dpkg/info directory as shown.
$ sudo ls -l /var/lib/dpkg/info | grep -i package_name
After listing the files, you can move them to the /tmp directory as shown
$ sudo mv /var/lib/dpkg/info/package-name.* /tmp
Alternatively, you can use the rm command to manually remove the files.
$ sudo rm -r /var/lib/dpkg/info/package-name.*
Finally, update the package lists as shown:
$ sudo apt update

View More
linuxhelp
answered Oct 16, 2021
Your Answer
||||
x
 
100:0