我下載的源代碼DAHDI 2.6.1 + 2.6.1和Linux Kernel 3.8.0-29-generic。DAHDI無法在Linux內核中編譯3.8.0-29-通用
當我輸入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