我下载了 DAHDI 2.6.1 + 2.6.1 和 Linux Kernel 3.8.0-29-generic 的源代码。
当我键入sudo apt-get install linux-headers-$(uname -r)
来安装Linux内核头文件时,我收到如下消息:
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-3.8.0-29-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
尝试在UBUNTU服务器上编译并安装DAHDI时遇到问题。它向我显示以下消息:
/home/asteriskpbx/src/asterisk-complete/dahdi/2.6.1+2.6.1/linux/drivers/dahdi/wctdm.c:2604:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wctdm_init_one'
/home/asteriskpbx/src/asterisk-complete/dahdi/2.6.1+2.6.1/linux/drivers/dahdi/wctdm.c:289:22: warning: 'ifaces' defined but not used [-Wunused-variable]
/home/asteriskpbx/src/asterisk-complete/dahdi/2.6.1+2.6.1/linux/drivers/dahdi/wctdm.c:2592:13: warning: 'wctdm-reset_tdm' defined but not used [-Wunused-function]
等等...
最后,它显示:
cc1: some warnings being treated as errors
make[3] : *** [/home/asteriskpbx/src/asterisk-complete/dahdi/2.6.1+2.6.1/linux/drivers/dahdi/wctdm.o] Error 1
make[2] : *** [_module_/home/asteriskpbx/src/asterisk-complete/dahdi/2.6.1+2.6.1/linux/drivers/dahdi] Error 2
make[2] : Leaving directory '/usr/src/linux-headers-3.8.0-29-generic'
make[1] : *** [modules] Error 2
make[1] : Leaving directory '/home/asteriskpbx/src/asterisk-complete/dahdi/2.6.1+2.6.1/linux'
make: *** [all] Error 2
最佳答案
我在尝试从源代码构建时遇到了同样的问题。我从SVN信息库中 check out 了最新版本的dahdi。不幸的是,最新版本是2.6.1 + 2.6.1。转到主站点并下载最新版本:
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gzenter code here
解压缩,然后再次尝试“全部创建”命令。