How Do I Handle a .deb Package Installation, Upgrade, or Uninstallation Failure?
Symptom
If the .deb package fails to be installed, upgraded, or uninstalled, residual cache information will cause an installation or upgrade failure.
Solution
If the .deb package fails to be installed, upgraded, or uninstalled, you need to manually delete the cache information. The procedure is as follows:
- Run the following command to delete the configuration file list of the failed package (ascend310-driver is used as an example):
rm /var/lib/dpkg/info/ascend310-driver*
- Run the following command to forcibly delete the files:
dpkg --remove --force-remove-reinstreq ascend310-driver
- Delete the residual files in the directory of the software that fails to be installed. (The directory in the example is the default installation directory. Replace it with the actual installation directory.)
rm -rf /usr/local/Ascend/driver