Make: *** [config] Erreur 1 : init.asterisk'

I need to install and configure asterisk on debian

I download and install
debian sarge 3.1 kernel 2.6
zaptel-1.2.16.tar.gz
libpri-1.2.4.tar.gz
asterisk-1.2.17.tar.gz

At the end after install asterisk
#make clean
#make install
#make samples

I try this command and I obtain an error

rm -f include/asterisk/version.h.tmp
if [ -d /etc/rc.d/init.d ]; then
install -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk;
/sbin/chkconfig --add asterisk;
elif [ -d /etc/init.d ]; then
install -m 755 init.asterisk /etc/init.d/asterisk;
fi
install: ne peut évaluer `init.asterisk’: Aucun fichier ou répertoire de ce type
make: *** [config] Erreur 1

please help me how can I do ?

thanks

This is really strange because make samples shouldn’t even invoke the section inferred by the error message. Maybe you typed ‘make config’?

Anyway, it seems to say that your source is incomplete. Or it is possible that the make file contained some error or doesn’t work well with French locale. (I’m leaning toward a make file error, as init.asterisk doesn’t exist in the main directory. So do file a bug.)

In any case, you can safely ignore the error. If later on you want to use the supplied RC script, you can

then create symbolic links toward appropriate RC directories.

Sorry I forget some think
after all this command I try
#make config

Then I got the error
Each time that i restart my computer I need absolutly to restart asterisk manually

Yes. That’s when you copy that RC file, and link to your default run level to make Asterisk start automatically upon reboot.

I also observ that this file /etc/default/asterisk is empty
and this 2 files asterisk and asterisk.apt-get is absent in /etc/init.d folder

ASTERISK:~# /etc/init.d/asterisk restart
-bash: /etc/init.d/asterisk: Aucun fichier ou répertoire de ce type

Why I got this mistake ?
how can I resolv it please?

[quote=“valley”]

then create symbolic links toward appropriate RC directories.[/quote]

The file is in your Asterisk source tree. You need to know what is the default run level (or you can link to 1-5 as S script, levels 0,S,6 as K script).

Please I am new on debian and asterisk enviroment.
I don’t understand when you say

“run level (or you can link to 1-5 as S script, levels 0,S,6 as K script).”

when I try the command that you send I got this

ASTERISK:~# cp contrib/init.d/rc.debian.asterisk /etc/init.d/
cp: ne peut évaluer `contrib/init.d/rc.debian.asterisk’: Aucun fichier ou répertoire de ce type
ASTERISK:~#
he don’t see the file or forder

Please help me

[quote=“pouokam”]ASTERISK:~# cp contrib/init.d/rc.debian.asterisk /etc/init.d/
cp: ne peut évaluer `contrib/init.d/rc.debian.asterisk’: Aucun fichier ou répertoire de ce type[/quote]

You need to cd to where the Asterisk source code is in order to run the cp command.

In order to automatically start the server, you really need some understanding about run levels and the RC facility under /etc/rc?.d/ because the make file is apparently not helpful. (There are pleny of Linux documents.) But as a shortcut, try (Debian seems to love run level 2)

[code]# ln -s /etc/init.d/asterisk /etc/rc2.d/S45asterisk

ln -s /etc/init.d/asterisk /etc/rc0.d/K45asterisk

ln -s /etc/init.d/asterisk /etc/rc1.d/K45asterisk

ln -s /etc/init.d/asterisk /etc/rcS.d/K45asterisk

[/code]