During the final steps of installing Asterisk (18.11.3) on a clean install of Centos Stream 9, I am running into a problem with make config:
[me@localhost asterisk-18.11.3]# make config
/bin/sh: line 7: /sbin/chkconfig: No such file or directory
make: *** [Makefile:898: config] Error 127
[me@localhost asterisk-18.11.3]#
Looking at Makefile, I confirmed it was looking for /sbin/chkconfig and that it in fact does not exist.
config: @if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then
./build_tools/install_subst contrib/init.d/rc.redhat.asterisk “$(DESTDIR)/etc/rc.d/init.d/asterisk”;
if [ ! -f “$(DESTDIR)/etc/sysconfig/asterisk” ] ; then
$(INSTALL) -m 644 contrib/init.d/etc_default_asterisk “$(DESTDIR)/etc/sysconfig/asterisk” ;
fi ;
if [ -z “$(DESTDIR)” ] ; then
/sbin/chkconfig --add asterisk ;
fi ; \
Doing some research, it appears chkconfig was probably deprecated back around Centos 7 and replaced by systemctl.
I am in a bit over my head here. Any suggestions on how to proceed?
Thank you for your suggestion! Unfortunately, my problem is rooted in the last line of your script – make install. The commands for the config: option in Makefile (starting at line 898) appears to try to use the chkconfig command which is apparently deprecated. This results in the init scripts not being installed.
‘make config’ causes Asterisk to start automatically when the server boots up but is not required.
After boot up you can start Asterisk manually with ‘sudo asterisk’.
In doing some clean-up to try to get thru this, I updated to Kernel 5.14 which has now caused a problem with making dahdi-linux. Going to create a new thread for that problem.