Dahdi compile problem

I’m trying to install the latest freepbx and asterisk according to the instructions here:

http://wiki.freepbx.org/display/HTGS/Installing+FreePBX+12+on+Ubuntu+Server+14.04+LTS

I have Ubuntu 14.04.

When I try to make the dahdi installation, I get the following errors:

make -C linux all
make[1]: Entering directory `/usr/src/dahdi-linux-complete-2.10.0.1+2.10.0.1/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/dahdi-linux-complete-2.10.0.1+2.10.0.1/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/src/dahdi-linux-complete-2.10.0.1+2.10.0.1/linux/drivers/dahdi/firmware'
You do not appear to have the sources for the 3.13.0-37-generic kernel installed.
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.10.0.1+2.10.0.1/linux'
make: *** [all] Error 2

I have installed linux-source and linux-headers-generic several times, and the result is:

linux-headers-generic is already the newest version. linux-source is already the newest version.

If I run

I get

It’s possible that I inadvertently deleted some source code directories when I was trying to clean my /usr/src/ directory in preparation for the installation, but shouldn’t installing the source and headers have fixed that?

Any ideas how to fix this problem?

you need the specific headers for your running kernel not just the generic ones apt-cache search 3.13.0

This identified the problem:

apt-cache search 3.13.0 linux-cloud-tools-common - Linux kernel version specific cloud tools for version 3.13.0 linux-doc - Linux kernel specific documentation for version 3.13.0 linux-headers-3.13.0-24 - Header files related to Linux kernel version 3.13.0 linux-source-3.13.0 - Linux kernel source for version 3.13.0 with Ubuntu patches ...

OK. Now, how do I install the specific source for my kernel 3.13.0.37?

Thanks for the help!

What exactly is your hardware?

    product: PowerEdge 700
    vendor: Dell Computer Corporation
    width: 32 bits
    capabilities: smbios-2.3 dmi-2.3 smp-1.4 smp
    configuration: boot=normal chassis=rackmount cpus=1 uuid=44454C4C-4700-1059-8046-B1C04F573431
  *-core
       description: Motherboard
       product: 0P1158
       vendor: Dell Computer Corporation
       physical id: 0
       version: A00
     *-firmware
          description: BIOS
          vendor: Dell Computer Corporation
          physical id: 0
          version: A00
          date: 02/02/2004
          size: 64KiB
          capacity: 960KiB
          capabilities: isa pci pnp upgrade shadowing escd cdboot bootselect edd int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification netboot
     *-cpu
          description: CPU
          product: Intel(R) Pentium(R) 4 CPU 2.80GHz
          vendor: Intel Corp.
          physical id: 400
          bus info: [email protected]
          version: 15.3.3
          serial: 0000-0F33-0000-0000-0000-0000
          slot: PROC1
          size: 2800MHz
          capacity: 4GHz
          width: 32 bits
          clock: 800MHz
          capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pebs bts pni dtes64 monitor ds_cpl cid
          configuration: id=1

Well, if its not some form of virtualization, then you somehow got your kernel out of sync with your repos, try

apt-get update and see if the correct headers show up. or find a debian package of linux-headers-3.13.0-37-generic and dpkg -i it.

I was able to fix it by reinstalling the kernel. This installed all of the sources and headers. Thanks for the help.