AnsweredAssumed Answered

uProf install fails on RHEL 7.5

Question asked by alvaroafernandez on Feb 11, 2019

As part of the installation of uProf 2.0 on Red Hat Enterprise 7.5, I am running into this error message when I attempt to install the Power Profiler Linux Driver. (I downloaded the tar ball rather than trying the RPM.)

 

The User Guide for version 2.0 says to run

sudo AMDPowerProfilerDriver.sh install

 

I am running as root in any case...

 

When I run the command above, I get the following message:

ERROR: Linux headers is required for installing AMD Power Profiler driver.
       Please install the sources using
       sudo yum install kernel-devel
       and then start the installation again.
[root@localhost bin]#

 

But I have installed these already:

[root@localhost bin]#  sudo yum install kernel-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package kernel-devel-3.10.0-957.5.1.el7.x86_64 already installed and latest version
Nothing to do

 

Taking a look at the install script itself, the issue occurs at a point where the script checks for the existence of a directory; see verify_kernel_header() below. Since uname -r returns 3.10.0-862.el7.x86_64, we expect a directory /lib/modules/3.10.0-862.el7.x86_64/build to exist. It does:

 

[root@localhost bin]# ls -la /lib/modules/3.10.0-862.el7.x86_64/build
lrwxrwxrwx. 1 root root 38 Jan  5 22:00 /lib/modules/3.10.0-862.el7.x86_64/build -> /usr/src/kernels/3.10.0-862.el7.x86_64

 

I can verify that it is looking at /lib/modules/3.10.0-862.el7.x86_64/build

 

So... why is this failing?? 

verify_kernel_header() {
    # kernel headers is linked to build directory
    HEADER_SRC="/lib/modules/`uname -r`/build"
    if [ -f /etc/redhat-release ]
    then
        if [ ! -d ${HEADER_SRC} ]
        then
            echo "ERROR: Linux headers is required for installing AMD Power Profiler driver."

 

Outcomes