Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get DAHDI installed for Asterisk on my Slicehost slice...

I start off sudo apt-get install dahdi-dkms dahdi-linux

Which partially fails with this in the install log:

Setting up dahdi-dkms (1:2.2.1+dfsg-1ubuntu2) ...
Loading new dahdi-2.2.1+dfsg-1ubuntu2 DKMS files...
First Installation: checking all kernels...
Building only for
Building for architecture x86_64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

This seems to be because I do not have the kernel source installed. However, with Slicehost, kernel sources are only available through in my case, this is the kernel source I need:

Those kernel sources--so far as I'm aware--do not exist in any apt-get repository.

So I download and extract the source, but I don't think it is "installed" the same way as if I had gone through apt-get install kernel-source or whatever, and so I keep getting this error when trying to install dahdi.

How can I "install" the Slicehost compressed kernel code of my system so that I can install dahdi through apt-get??

I am running Ubuntu Lucid.

share|improve this question
up vote 2 down vote accepted

Here's the process. Prepare the kernel first:

wget -q
mkdir /usr/src/kernels/
tar xzf -C /usr/src/kernels/
cd /usr/src/kernels/linux-
zcat /proc/config.gz > .config
make oldconfig && make modules_prepare

Once that's done, just follow the documentation provided with the dahdi module in the Makefile:

cd ~
svn co dahdi-kernel
cd dahdi-kernel
KSRC=/usr/src/kernels/linux- make install

You should then be all set:

# modprobe dahdi
# lsmod | grep dahdi
dahdi                 186793  0 
crc_ccitt               1203  1 dahdi
# modinfo dahdi
filename:       /lib/modules/
version:        SVN-trunk-r8983
alias:          dahdi_dummy
license:        GPL v2
description:    DAHDI Telephony Interface
author:         Mark Spencer <>
srcversion:     B1B1151F11B45BEFBEEE0B0
vermagic: SMP mod_unload 
parm:           debug:int
parm:           deftaps:int

I just did this on a slice running Debian Lenny and

share|improve this answer
"When you build the dahdi module, you'll need to specify the path to your kernel source that you just prepared." How do I do this?? – neezer Jul 27 '10 at 19:15
Check my updated post above. – majorhayden Jul 27 '10 at 21:03
Sweet awesomeness! That was EXACTLY what I was looking for! I've been banging my head over this four hours... Thank you so much! – neezer Jul 27 '10 at 21:15

Have you checked this article?

Follow the steps to install the headers and prepare for module installation, and hopefully those will let you install the package.

Often packages expect to find kernel source in /usr/src, so if it complains after you unpack it there and do the headers and module_prepare stuff, try making a symlink from /usr/src/linux to where you unpacked the source.

share|improve this answer
Yes, I have checked that article (where I got the mentioned in my question). I have downloaded the source, uncompressed it, and ran the headers and modules_prepare stuff and all that jazz... yet I still don't have a clear answer on how to actually compile dahdi--either through apt-get or manually--with this kernel source. That's what I really need to know! – neezer Jul 27 '10 at 20:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.