Fix the "Multiple devel kernels installed" error

Updated at:

Remove extra kernel-devel packages to resolve the "Multiple devel kernels installed" error during OS migration with SMC.

Problem description

The "Multiple devel kernels installed" error occurs during OS migration.

Cause

The kernel-devel package provides kernel header files and Makefiles for building kernel modules. It is only required in development environments and can be safely removed. The dnf command does not support in-place upgrades when multiple kernel-devel packages are installed, which causes OS migration to fail.

Solution

  1. Connect to the target ECS instance. Connect to a Linux instance by using a password or key.

  2. Remove extra kernel-devel packages, keeping only one.

    1. List the installed kernel-devel packages:

      rpm -qa | grep kernel-devel

      Sample output:

      kernel-devel-3.10.0-1160.90.1.el7.x86_64
      kernel-devel-3.10.0-1160.80.1.el7.x86_64
    2. Run the following command to remove the extra packages:

      yum remove kernel-devel-3.10.0-1160.80.1.el7.x86_64
    3. Enter y and press ENTER to confirm.

  3. After you resolve the issue, run the SMC client to retry the migration. For more information, see Run the SMC client.