How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)

Something like this appears when installing software with apt-Get

install-info: No dir file specified; try --help for more information.dpkg:
Error while processing gettext (--configure): the subprocess post-installation script returned the error number 1 An error occurred while processing.
E: Sub-process /usr/bin/dpkg returned an error code (1)

The solution is as follows:
sudo mv /var/lib/ DPKG /info /var/lib/ DPKG /info_old // now the info folder is renamed
sudo mkdir /var/lib/dpkg/info // create a new info folder
3.sudo apt-get update, and sudo apt-get-f install // update source and repair installation
sudo mv /var/lib/ DPKG /info/* /var/lib/ DPKG /info_old/will generate some files under the new info folder after the previous operation, now move all these files to the info_old folder
sudo rm-rf /var/lib/ DPKG /info // delete the info folder you created
sudo mv /var/lib/ DPKG /info_old /var/lib/ DPKG /info/change the previous info folder back to the name
until this problem is solved successfully
Under Ubuntu, Apt-get is close to being one of the most commonly used shell commands, as it is a common tool command for Ubuntu to install software through Novstand.
Common APT command parameters:
apt-cache search package // search package
apt-cache show package // gets the relevant information of the package, such as description, size, version, etc
sudo apt-get install package //
sudo apt-get install package --reinstall // reinstall package
sudo apt-get remove package // remove package
sudo apt-get remove package--purge // purge package, including configuration files, etc
sudo apt-get update // update source
sudo apt-get upgrade // updates installed packages

Read More: