linuxamazon-web-servicesamazon-ec2centos

error installing aws application migration service


When trying to install the AWS Application Migration service agent I get the following error:

Error: Failed Installing the AWS Replication Agent Installation failed.

Unexpected error while making agent driver! Are kernel linux headers installed correctly?

Learn more about installation issues in our documentation at https://docs.aws.amazon.com/mgn/latest/ug/Troubleshooting-Agent-Issues.html#Error-Installation-Failed

Here is the result of the log file: (I already tried all the step in the URL to rectify the issue)

Any assistance is greatly appreciated!

--- Building software
running: ['chmod', '0770', './configure']
retcode: 0
running: ['/bin/sh', 'configure', '--with-srcdir=/lib/modules/3.10.0-1127.19.1.el7.x86_64/build']
retcode: 0
running: 'which zypper'
retcode: 256
running: ['make'] with environment set to {'SRCDIR': '/lib/modules/3.10.0-1127.19.1.el7.x86_64/build', 'PWD': '/tmp/tmpgdy945nw/AgentDriver'}
retcode: 2
--- Make failed. Trying again with CONFIG_CC_STACKPROTECTOR_STRONG disabled 
StdOut from driver make: make -C /lib/modules/3.10.0-1127.19.1.el7.x86_64/build M=/tmp/tmpgdy945nw/AgentDriver modules

StdErr from driver make: make: *** /lib/modules/3.10.0-1127.19.1.el7.x86_64/build: No such file or directory.  Stop.
make: *** [AgentDriver] Error 2

running: ['make', 'CONFIG_CC_STACKPROTECTOR_REGULAR=1'] with environment set to {'SRCDIR': '/lib/modules/3.10.0-1127.19.1.el7.x86_64/build', 'PWD': '/tmp/tmpgdy945nw/AgentDriver'}
retcode: 2
Unexpected error while making agent driver! Are kernel linux headers installed correctly?
StdOut from driver make second run: make -C /lib/modules/3.10.0-1127.19.1.el7.x86_64/build M=/tmp/tmpgdy945nw/AgentDriver modules

StdErr from driver make second run: make: *** /lib/modules/3.10.0-1127.19.1.el7.x86_64/build: No such file or directory.  Stop.
make: *** [AgentDriver] Error 2

Installation returned with code 1
Installation failed due to unspecified error:
Traceback (most recent call last):
  File "shared/installer_linux/install_agent.py", line 1202, in main
SystemExit: 1


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cirrus/installer_shared/installer_main.py", line 1092, in _main
  File "cirrus/installer_shared/installer_main.py", line 961, in main
  File "cirrus/installer_shared/installer_main.py", line 787, in install
  File "cirrus/installer_shared/installer_main.py", line 370, in run_agent_installer
shared.installer_utils.cloud_utils.Error: Failed Installing the AWS Replication Agent [agent_version: 5.0.0.2023.187.1349, installation_id: *******, mac_addresses: *****, _origin_client_type: installer]
aws_replication_agent_installer.log (END)

Solution

  • The error that you see:

    Unexpected error while making agent driver! Are kernel linux headers installed correctly?
    

    Is likely because the agent cannot install the kernel-devel packages. To fix this and according to the official documentation, you need to manually download the kernel-devel package for your OS. Once you re-download the package, you can run the installation again.

    You can download the correct kernel-devel package by running the below:

    On RHEL/CENTOS/Oracle:
    sudo yum install kernel-devel-`uname -r`
    
    On Oracle with Unbreakable Enterprise Kernel:
    sudo yum install kernel-uek-devel-`uname -r`
    
    On Debian/Ubuntu:
    sudo apt-get install linux-headers-`uname -r`
    
    On SUSE:
    sudo zypper install kernel-default-devel-`uname -r`
    

    You'll also need to verify that the folder that contains the kernel-devel/linux-headers is not a symbolic link.

    The bottom of this article here demonstrates this a bit further.
    Under the Error: Unexpected error while making agent driver! Are kernel linux headers installed correctly? header.

    Hope this helps! :)