When I was using the apt-get command to install software in a Linux system, I encountered the following error message:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I found a helpful solution in Google search results, as follows:
cd /var/lib/dpkg/ # Navigate to the dpkg directory
sudo mv info/ info_bak # Rename the info folder first
sudo mkdir info # Create a new info folder
sudo apt-get update # Update
sudo apt-get -f install # Repair
sudo mv info/* info_bak/ # After executing the previous step, some files will be generated in the new info folder. Now move all these files to the info_bak folder
sudo rm -rf info # Delete the newly created info folder
sudo mv info_bak info # Rename the previous info folder back
Leave a Reply