Installation of the Cyber Protection Agent Failure with the Error Message "snapapi fails to build"

For Cloud Backup

If you get the error message snapapi fails to build when installing the Cyber Protection Agent, you need to make sure that the running kernel matches the latest installed version.

Below are 2 possible approaches to do this and the steps required to do so.

Option 1: Check the kernel version and select the new kernel on reboot (Recommended)

  • First, check the kernel version currently in use. To check it, enter the following command:
    uname -r

  • Install the kernel-devel package and check the version. To do this, enter the following commands:

    Install the kernel-deve1 package:
    yum install kernel-devel
    Check the version:
    rpm -qa |grep kernel
    Install kernel-devel package:
    sudo apt install linux-headers-amd64
    Check version:
    dpkg -l linux-headers-*

  • If the header/devel package has a higher version number than the current kernel, you must install a newer kernel. To do this, enter the following command(s):

    yum update kernel
    If you already have the latest kernel version installed, enter the following command to install a correct and compatible version of the kernel-devel package:
    sudo yum install "kernel-devel-uname-r == $(uname -r)"
    sudo apt install linux-image-amd64
    Update all packages. Enter the following command:
    sudo apt update && apt upgrade
    sudo apt dist-upgrade

  • Perform a reboot. Depending on the distribution, this may require different steps:

    CentOS 7
    Set the kernel version and reboot. How to set the kernel version is explained in the section Setting the Kernel Version as Default (CentOS 7).

    If necessary, reboot and select the new kernel from the grub menu at boot time.

  • Install the Cyber Protection Agent. Instructions can be found in the following articles:

    Cloud Server:
    Installing the Backup Agent (Linux)

    Dedicated Server:
    Installing the Backup Agent (Dedicated Server with Linux)

    Installing the Cyber Protection Agent (PC or Laptop with Windows)

Option 2: Check the kernel version, download the correct Linux headers package, and move it to /usr/src/kernels (applies to Debian only)

If you do not want to reboot or use a different kernel, do the following:

Setting the Highest Installed Kernel Version as Default (CentOS 7)

To set the highest installed kernel version as the default, do the following:

  • Open the /etc/default/grub file with the vi editor. Enter the following command:
    [root@localhost ~]# vi /etc/default/grub

  • Replace the value at the entry GRUB_DEFAULT= with 0:
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_CMDLINE_LINUX="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=auto"

    Other kernels can be selected, for example, with the entry GRUB_DEFAULT=1 or GRUB_DEFAULT=2.

  • Regenerate the Grub configuration file. To do this, enter the following command:
    [root@localhost ~]# sudo grub2-mkconfig -o /boot/grub2/grub.cfg