Dadhi you do not appear to have sources for kernel installed

Topic: Dahdi kernel source missing

    In this article you are going to learn how to solve the error you don't appear to have sources for kernel installed while installing the Dahdi driver in asterisk scratch installations. You will be facing the kernel issue while installing the dahdi in the linux server which is not updated up to date or in the older version of linux or installing the old dahdi versions.

You do not appear to have the sources for the kernel installed

What is DAHDI?

    DAHDI is a collection of open source drivers, for linux, that are used to interface with a variety of telephony related hardware. 
It consists of two parts.
The DAHDI-Linux project contains the individual board drivers for the supported hardware. 
The DAHDI-Tools project contains an assortment of user space utilities that are used to setup and test the drivers.   

Reason for DAHDI kernel Issue

    You might not installed the latest Kernel in you linux server or you might have installed older DAHDI version which not supporting the current kernel version installed or kernel devel missing or kernel version mismatch

Workaround for DAHDI kernel issue

    Here I have listed the possible workaround to resolve the Kernel source missing issue while installing DAHDI driver in asterisk PBX.

Latest Kernel and Kernel-devel installation

    Before proceeding with the DAHDI installation you have to install the latest kernel and kernel devel package , run the below command to update or install latest kernel, note this command is for centos for Debian OS use apt-get

yum install kernel*
yum update kernel*
yum install kernel-devel

 OR

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

Edit Kernel version in Grub file

    Sometimes the installed kernel version might not be updated properly in the grub file, the grub file still refers to the old kernel version
Follow the below steps to update the kernel version in grub file
Run the below command to check the kernel version

uname -r
make note of the version displayed, now run yum install kernel  you might see different kernel version already installed, if it shows different update the kernel version installed in grub.conf
vi /boot/grub/grub.conf

Check the kernel version updated in grub file, replace it with kernel installed.
once updated reboot the server once to take effect the new kernel version, followed 
to that install dahdi again.
If still fails and displays same error follow the next workaround.

Softlink kernel Version

    This is a Temporary workaround to resolve the DAHDI kernel issue. run the below command to Softlink the kernel version with the build
ln -s /usr/src/kernels/2.6.32-573.12.1.el6.x86_64/ build
reboot
reinstall dahdi

Modifying the Dahdi Source code

    Download the latest DAHDI Software from the asterisk website, unzip or untar the file and edit the source code as shown below ,followed to that proceed with the DAHDI installation

cd /usr/src
wget https://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
untar dahdi-linux-complete-current.tar.gz
cd /usr/src/asterisk/dahdi-linux-complete-3.1.0+3.1.0/

Now edit the file 

vi /usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/include/dahdi/kernel.h
change 
#include: </linux/pci-aspm.h>
 to 
</linux/pci.h>

Once file saved proceed with the dahdi installation 
dahdi installation steps

make all
make install
make config

Conclusion

Hope this article is helpful in resolving the issue "you do not appear to have sources for kernel installed" while installing the DAHDI driver. for professional support reach me on skype or telegram id: strker24x7

Next Post Previous Post
1 Comments
  • gopi baskar
    gopi baskar April 4, 2022 at 11:32 AM

    Dahdi - You do not appear to have the sources for the kernel installed.

Add Comment
comment url