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

created at 11-10-2021 views: 9

error

This error occurred when installing openssl-server, because the following error occurred when apt-get installed the software:

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

solution

Solution:

1. Now rename the info folder

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bk

2. Create a new info folder


sudo mkdir /var/lib/dpkg/info 

3. Installation and repair

sudo apt-get update
sudo apt-get install -f 

4. After performing the previous step, generate some files in the info folder, and now move all these files to the info.bk folder

sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bk 

5. Delete the info folder you created

sudo rm -rf /var/lib/dpkg/info 

6. Restore the original info folder and modify the name

sudo mv /var/lib/dpkg/info.bk /var/lib/dpkg/info
created at:11-10-2021
edited at: 11-10-2021: