Reinstalling Dahdi in FreePBX -- You do not appear to have the sources for the 3.10.0-957.21.3.el7.x86_64 kernel installed

In my scenario, I have to reinstall Dahdi in a FreePBX. So, I am using a FreePBX image from and dahdi 3.1.0 also provided there.

When I run make in the dahdi installation folder, I get the message “You do not appear to have the sources for the 3.10.0-957.21.3.el7.x86_64 kernel installed.”

I already tried some of the suggestions I could find here and there like:

yum install kernel-devel kernel-headers
yum install kernel-$(uname -r)
yum install kernel-devel-$(uname -r)
ln -s /usr/src/kernels/$(uname -r) build

My system is:

[root@freepbx dahdi-linux-complete-3.1.0+3.1.0]# hostnamectl
Static hostname:     freepbx.sangoma.local
Icon name:              computer-vm
Chassis:                  vm
Machine ID:             06c44c046c6b4ab981f384417717873a
Boot ID:                   7064fa0513ef4ae0a82cf734ad0d5f40
Virtualization:           kvm
Operating System:  Sangoma Linux 7 (Core)
CPE OS Name:       cpe:/o:sangoma:sng:7::server:utf8
Kernel:                     Linux 3.10.0-957.21.3.el7.x86_64
Architecture:            x86-64

Make output:

[root@freepbx dahdi-linux-complete-3.1.0+3.1.0]# sudo make
make -C linux all
make[1]: Entering directory `/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/firmware'
You do not appear to have the sources for the 3.10.0-957.21.3.el7.x86_64 kernel installed.
make[1]: Leaving directory `/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux'

You need to install the kernel-devel package that matches the running kernel (or change the running kernel to match the kernel-devel package currently installed.

Thanks for the reply. The running kernel matches the kernel-devel. I remove/install just to be sure. It’s still the same.

DAHDI 3.0 will only compile on kernels 4.15 or newer.

“The setup_timer functions were removed in upstream kernel v4.15, and therefore
this change is needed in order to compile DAHDI for kernels >= 4.15.”

Use DAHDI 2.11.1 for older kernel

Thanks for the reply. As you suggested, I tried an older dahdis: 2.11.0 and 2.10.0, but I still got the same make output.
I am not sure if I can (manually) upgrade my kernel version since I am using the most recent FreePBX image. Yet, I tried yum update kernel and yum upgrade kernel with both returning: the kernel was updated.

You need the kernel-devel package as well. The usual problem is that people are running an older kernel but install the latest kernel-devel, but not installing it would have the same effect.

Isn’t this what you are talking about?

# yum install kernel-devel-$(uname -r)


Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
Package kernel-devel-3.10.0-957.21.3.el7.x86_64 already installed and latest version
Nothing to do
1 Like

I think you will need to look at the log from configure, to find out what it tested to make it think they were missing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.