How to fix APT engine corruption?

Description

You cannot proceed with scan/deployment since APT is corrupted. You can see the error message APT engine is corrupted! Please contact support with server and agent logs during a scan or deployment process. The following are the possible reasons:

  • The user might have initiated a third-party software installation at his end which could have gone wrong.
  • Improper package management, incorrect installation of packages, and installation of unnecessary packages.

Note: Ensure the Linux machine is connected to the internet.

Steps

We have an inbuilt solution in the form of script aptfixinstall.sh to fix this corruption which runs on detection of corrupted apt. If it still fails, the following steps will help in resolution:
Use the fix-missing option with apt-get update. Run the below commands in sequence to fix the issue:

  1. sudo apt-get update --fix-missing
  2. sudo apt-get install -f
  3. sudo dpkg --configure -a
  4. sudo apt-get clean
  5. sudo apt-get update

NOTE:We recommend you reach out to the vendor if you are still facing issues, as this appears to be related to environmental factors.

Kindly contact support for any queries.