How to handle and fix "WARNING: Unapproved packages installed: linux-*-headers-*" message during lastline_distribution_upgrade or lastline_test_appliance when unexpected kernel headers are found
search cancel

How to handle and fix "WARNING: Unapproved packages installed: linux-*-headers-*" message during lastline_distribution_upgrade or lastline_test_appliance when unexpected kernel headers are found

book

Article ID: 373794

calendar_today

Updated On:

Products

VMware vDefend Network Detection and Response

Issue/Introduction

This is an example snip from lastline_test_appliance:

2024-07-17 21:20:13,418: output: > SOFTWARE:
2024-07-17 21:20:13,418: output: >   WARNING: Unapproved packages installed: linux-headers-5.4.0-170-generic (current=5.4.0-170.188~18.04.1, approved-version=not-installed), linux-image-5.4.0-170-generic (current=5.4.0-170.188~18.04.1, approved-version=not-installed), linux-modules-5.4.0-170-generic (current=5.4.0-170.188~18.04.1, approved-version=not-installed), linux-modules-extra-5.4.0-170-generic (current=5.4.0-170.188~18.04.1, approved-version=not-installed)
2024-07-17 21:20:13,418: output: Exiting with error-code 2
2024-07-17 21:20:13,487: output:
2024-07-17 21:20:13,487: Running lastline_test_appliance: return code: 2

 

Cause

System is running on older kernel and has not been rebooted since a newer kernel is installed. 

Resolution

Please raise a support request to validate this before running below command ;

Steps to follow:

  1. We can just reboot the appliance.
  2. Run the script at the command prompt:
             --> remove_old_kernels.sh

This script will help in removing the older kernel version from the appliance. After running the script you can proceed with the upgrade if you are in the middle of the upgrade.