LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem installing Asterisk (https://www.linuxquestions.org/questions/linux-software-2/problem-installing-asterisk-545773/)

rsatapathy 04-13-2007 10:27 AM

Problem installing Asterisk
 
I'm installing asterisk in my Dell DHM system on the fedora core 6 platform.
I'm getting this error mesg.

Quote:

[root@dialer zaptel-1.2.16]#make
grep: /lib/modules/2.6.18-1.2798.fc6/build/include/linux/autoconf.h: No such file or directory
Makefile:211: target `ztdummy.o' given more than once in the same rule.

You do not appear to have the sources for the 2.6.18-1.2798.fc6 kernel installed.
make: *** [all] Error 1
[root@dialer zaptel-1.2.16]#
Can anyone help me on this topic ?

andy77 04-13-2007 12:51 PM

It seems like you need to install the kernel headers. Try 'rpm -qa | grep kernel' and make sure it returns kernel-devel and kernel-headers. If it doesn't then install the missing package via yum.

roderickm 04-13-2007 12:57 PM

Installing kernel source on FC6
 
Google is your friend! Notice the error message, You do not appear to have the sources for the 2.6.18-1.2798.fc6 kernel installed. Then search appropriately. You'll find something along these lines:

http://www.mjmwired.net/resources/mj...html#kernelsrc

rsatapathy 04-13-2007 11:55 PM

Hi andy thanks for you sugestions. I'm giving below the output of the command
#rpm -qa | grep kernel
Quote:

[root@dialer ~]# rpm -qa | grep kernel
kernel-headers-2.6.18-1.2798.fc6
kernel-2.6.18-1.2798.fc6
kernel-devel-2.6.18-1.2798.fc6
[root@dialer ~]#
I think the kernel headers are installed. So what more do i need to check ? Please help.

roderickm 04-15-2007 09:43 AM

Quote:

Originally Posted by rsatapathy
I think the kernel headers are installed. So what more do i need to check ?

According to the Zaptel Makefile, you should only see that error when the $(KSRC) variable is empty or the directory to which $(KSRC) refers does not exist:

Code:

@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then \
  echo "You do not appear to have the sources for the $(KVERS) kernel installed."; \
  exit 1 ; fi

Looking back through the Makefile, we find that $(KSRC) is defined as:

Code:

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-2.4 /usr/src/linux
    KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ]; then echo
$$dir; break; fi; done)
  endif
endif

We know that $(KVERS) is defined, because the kernel version shows up in the error message. Look in /lib/modules/`uname -r`/build for your kernel headers. If not there, look also in /usr/src/linux-2.4 and /usr/src/linux for full sources. Without knowing more, my guess is that RPM thinks those packages are installed, but they're not (or no longer) there. You could use RPM to force-upgrade those headers, or install the kernel source headers manually without RPM.

Good luck!

rsatapathy 04-16-2007 11:23 AM

Thanks roderickm for your sujestions. It was indeed because of the kernel version
i found out the solution anyhow. Thanks for your effort though


All times are GMT -5. The time now is 06:02 AM.