LinuxMoz

Linux Stuff && Coffee

Asterisk: You Do Not Appear to Have the Sources for Kernel Installed

| Comments

If you get the following errors (or similar) when trying to build Asterisk you do not have then see the fix below to install the kernel devel / kernel headers. I have created this tutorial due to the amount of support requests received from my original tutorials, Asterisk Ubuntu Install, Asterisk Debian Install & Asterisk CentOS install.

Asterisk Build Errors Related to Kernel Headers / Devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
you do not appear to have the sources for the kernel install dahdi
you do not appear to have the sources for the 2.6.32-5-amd64 kernel installed
you do not appear to have the sources for the kernel installed
you do not appear to have the sources for the 3.2.0-23-generic-pae kernel installed
you do not appear to have the sources for the
you do not appear to have the sources for the 2.6.18-92.el5 kernel installed
you do not appear to have the sources for the 2.6.32-71.el6.i686 kernel installed
you do not appear to have the sources for the 2.6.18
you do not appear to have the sources for the 2.6 kernel installed
you do not appear to have the sources for the zaptel
you do not appear to have the sources for the ubuntu
you do not appear to have the sources for the xen kernel installed
you do not appear to have the sources for the zaptel
you do not appear to have the sources for the 2.6.32-5-amd64 kernel installed
you do not appear to have the sources for the 2.6.18-92.el5 kernel installed
you do not appear to have the sources for the 2.6.32-71.el6.i686 kernel installed
you do not appear to have the sources for the 2.6 kernel installed
you do not appear to have the sources for the 2.6.18
you do not appear to have the sources for the 2.6.32 kernel installed
you do not appear to have the sources for the 2.6.18 kernel installed
you do not appear to have the sources for the 2.6
you do not appear to have the sources for the 3.2.0-23-generic-pae kernel installed
you do not appear to have the sources for kernel installed
you do not appear to have the sources for the 2.6.32-71.el6.i686 kernel installed
you do not appear to have the sources for the 2.6.18-92.el5 kernel installed
you do not appear to have the sources for the 3.2.0-23-generic-pae kernel installed
you do not appear to have the sources for the 2.6.32-5-amd64 kernel installed
you do not appear to have the sources for the debian
you do not appear to have the sources for the dahdi
you do not appear to have the sources for the centos
you do not appear to have the sources for the 2.6 kernel installed
you do not appear to have the sources for the 2.6.32-71.el6.i686 kernel installed
you do not appear to have the sources for the 2.6.18-92.el5 kernel installed
you do not appear to have the sources for the 3.2.0-23-generic-pae kernel installed
you do not appear to have the sources for the kernel installed
you do not appear to have the sources for the 2.6.32-5-amd64 kernel installed
you do not appear to have the sources for the kernel install dahdi
you do not appear to have the sources for the 2.6.18-92.el5 kernel installed
you do not appear to have the sources for the 2.6.32-71.el6.i686 kernel installed
you do not appear to have the sources for the 2.6 kernel installed
you do not appear to have the sources for the zaptel
you do not appear to have the sources for the 3.2.0-23-generic-pae kernel installed

The CentOS, RHEL & Fedora fix

To fix the above Asterisk kernel compile / build error on CentOS, RHEL & Fedora enter the following:

First update with YUM:

1
yum update

Install the kernel headers & kernel devel on CentOS / RHEL:

1
yum install kernel-devel kernel-headers

Reboot and attempt to rebuild Asterisk / DHADI tools, if it still fails check your kernel version with:

1
uname -r

And then check the linked kernel source:

1
cd /lib/modules/`uname -r`

Check the symbolic link with:

1
ls -l

If the link is broken fix it with:

1
ln -s /usr/src/kernels/(kernel-source-dir) build

Ubuntu / Debian Install Kernel Source for Asterisk

The following command will fix the asterisk kernel build error on Debian / Ubuntu based distributions.

Ubuntu install kernel source:

1
sudo apt-get install linux-headers-$(uname -r)

If you are running Debian or Ubuntu as root you can drop the sudo command, use:

1
apt-get install linux-headers-$(uname -r)

Comments