Problem To Install Asterisk On Vps Digitalocean

Home » Asterisk Users » Problem To Install Asterisk On Vps Digitalocean
Asterisk Users 14 Comments

Hi list, I try to install asterisk on vps server , but fails when I want to install DAHDI

[root@shark dahdi-linux-2.6.3-rc1]# make make -C drivers/dahdi/firmware firmware-loaders make[1]: Entering directory
`/usr/src/dahdi-linux-2.6.3-rc1/drivers/dahdi/firmware’
make[1]: Leaving directory
`/usr/src/dahdi-linux-2.6.3-rc1/drivers/dahdi/firmware’
You do not appear to have the sources for the 2.6.32-358.6.2.el6.x86_64
kernel installed. make: *** [modules] Error 1

I have the libraries installed kernel

rpm -qa | grep -i kernel kernel-firmware-2.6.32-358.6.2.el6.noarch dracut-kernel-004-303.el6.noarch kernel-devel-2.6.32-358.6.2.el6.x86_64
kernel-2.6.32-358.6.2.el6.x86_64
kernel-headers-2.6.32-358.6.2.el6.x86_64

[root@shark dahdi-linux-2.6.3-rc1]# uname -r
2.6.32-358.6.2.el6.x86_64

regardss

14 thoughts on - Problem To Install Asterisk On Vps Digitalocean

  • What is the output of:
    ls -lat /lib/modules/`uname -r`/build and ls -lat /lib/modules/`uname -r`/build/

  • ls -lat /lib/modules/`uname -r`/build lrwxrwxrwx 1 root root 50 May 23 13:06
    /lib/modules/2.6.32-358.6.2.el6.x86_64/build ->
    ../../../usr/src/kernels/2.6.32-358.6.2.el6.x86_64

    ls -lat /lib/modules/`uname -r`/build/
    total 8
    drwxr-xr-x 3 root root 4096 May 24 22:02 .. drwxr-xr-x 2 root root 4096 May 23 19:50 . lrwxrwxrwx 1 root root 48 May 23 19:50
    linux-headers-2.6.32-358.6.2.el6.x86_64 ->
    /usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64
    lrwxrwxrwx 1 root root 34 May 23 19:34 2.6.32-358.6.2.el6.x86_64 ->
    kernels/2.6.32-358.6.2.el6.x86_64/

    2013/6/4 Russ Meyerriecks

  • This looks good.

    Oops. It looks like your build directory didn’t get setup correctly. I’d take a look at your -devel and -headers rpms to see what’s up.

    As a workaround, you may be able to specify your headers directly with:
    KSRC=/usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64 make

    Also, thanks for using -rc! It really helps us out.

  • thnk Russ , I have seen the Makefile, but I see many KSRC, where exactly would put

    KVERS:=$(shell uname -r)
    endif ifndef KSRC
    ifneq (,$(wildcard /lib/modules/$(KVERS)/build))
    KSRC:=/lib/modules/$(KVERS)/build
    else
    KSRC_SEARCH_PATH:=/usr/src/linux
    KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ]; then echo $$dir; break; fi; done)
    endif endif

    2013/6/4 Russ Meyerriecks

  • No need to modify the Makefile. (Unless you really want to). Just use the following command at your prompt. Bash will pass in the KSRC variable into the make system.

    KSRC=/usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64 make

    Also, you might try forcing a reload of the -devel package, then seeing if that fixes the build directory.

  • make KSRC=/full/path/to/kernel/headers/directory

    Makefiles allow you to override variables in the command line: if you run ‘make KSRC=whatever’, the variable KSRC is defined, and hence make will not get into the part between ‘ifndef KSRC’ and the corresponding
    ‘endif’.

    BTW: this is mentioned in the README of dahdi-linux:
    http://docs.tzafrir.org.il/dahdi-linux/#_kernel_source_headers

  • Hi here again, I’ve tried both ways

    [root@shark dahdi-linux-2.6.3-rc1]#
    KSRC=/usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64 make make -C drivers/dahdi/firmware firmware-loaders make[1]: Entering directory
    `/usr/src/dahdi-linux-2.6.3-rc1/drivers/dahdi/firmware’
    make[1]: Leaving directory
    `/usr/src/dahdi-linux-2.6.3-rc1/drivers/dahdi/firmware’
    You do not appear to have the sources for the 2.6.32-358.6.2.el6.x86_64
    kernel installed. make: *** [modules] Error 1

    [root@shark dahdi-linux-2.6.3-rc1]# make KSRC=/usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64
    make -C drivers/dahdi/firmware firmware-loaders make[1]: Entering directory
    `/usr/src/dahdi-linux-2.6.3-rc1/drivers/dahdi/firmware’
    make[1]: Leaving directory
    `/usr/src/dahdi-linux-2.6.3-rc1/drivers/dahdi/firmware’
    You do not appear to have the sources for the 2.6.32-358.6.2.el6.x86_64
    kernel installed. make: *** [modules] Error 1

    2013/6/4 Tzafrir Cohen

  • t> I try to install asterisk on vps server , but fails when I want to t> install dahdi

    There is no hardware for dahdi to use; you shouldn’t need to install it.

    -JimC

  • if it is true I have not any hardware but I need help to solve it and I
    think it could serve other future

    2013/6/4 James Cloos

  • Let us see the following:
    ls -lat /usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64

  • ls -lat /usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64
    ls: cannot access /usr/src/linux-headers-2.6.32-358.6.2.el6.x86_64: No such file or directory

    2013/6/4 Russ Meyerriecks

  • Oops. I got turned around by that broken symlink.

    Okay, i’m pretty sure your -devel package isn’t installed correctly. Try to use yum to remove the -devel package and re-install it. Then check if the /lib/modules/`uname -r`/build directory was installed correctly.

    As a workaround, the following might work:
    Check to make sure that this file exists:
    /usr/src/kernels/2.6.32-358.6.2.el6.x86_64/.config

    If so, then try:
    KSRC=/usr/src/kernels/2.6.32-358.6.2.el6.x86_64/ make

  • 2013-06-04 22:28, troxlinux skrev:

    Depending on the type of VPS this can work or not. My general experience of normal “stock”-VPS:es are that they are often oversold. And it will create a lot of issues for you with voip.

    On OpenVZ you can’t load kernel-modules in the VE anyway, so it’s no idea to compile Dahdi. But if you control the HN, you can install it there and give the VE access to it. In that case you should compile it in the VE as well. The same applies to LXC.

    On XEN/KVM I think it will work, but be sure to test the timing with dahdi_test – you don’t want the results to drop below 99.9. Try create some i/o (for example compile asterisk) and run the test in another window.

    Dahdi in VE’s is a pain, but can work if you control the HN. You should do development and testing on a dedicated server. After that, try move to a VPS and try to fix the issues. The other way around is very hard.