Freepbx install issue


I am having issues setting up freepbx, I have used the official listed guide for Centos 6.x, however I have got to the following issue:

freepbx]# ./start_asterisk start

Asterisk Started
freepbx]# ./install -n
Assuming you are Database Root
Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Error!
Error communicating with Asterisk. Ensure that Asterisk is properly installed and running as the asterisk user
Asterisk appears to be running as asterisk
Try starting Asterisk with the ‘./start_asterisk start’ command in this directory

I have checked it’s under correct user:

freepbx]# ps aux |grep asterisk
asterisk 1547 0.0 1.3 293440 6612 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1548 0.0 1.4 293440 7132 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1549 0.0 1.3 293440 6612 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1550 0.0 1.4 293440 7052 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1551 0.0 1.2 293440 6448 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1552 0.0 1.2 293440 6448 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1553 0.0 1.2 293440 6448 ? S 11:22 0:00 /usr/sbin/httpd
asterisk 1554 0.0 1.2 293440 6448 ? S 11:22 0:00 /usr/sbin/httpd
root 3111 0.0 0.1 106080 764 pts/0 S 11:29 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 3114 0.0 5.8 632728 29344 pts/0 Sl 11:29 0:00 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c

However I did find this:

freepbx]# ./start_asterisk stop

/usr/sbin/asterisk: error while loading shared libraries: cannot open shared object file: No such file or directory
Asterisk Stopped

I wouldn’t assume this is related, correct me if i’m wrong considering it runs.

Hope someone can shed some light on this as I have looked around and seems the answers point to incorrect user etc which I have already confirmed

I’ve had the same issue, although for me it seemed to be related to running in a Kickstart environment. However, my fix may work for you. Just change the command the installer uses to check on Asterisk, before you run the installer:

sed -i "s/-rx 'core show version'/-V/" installlib/installcommand.class.php

Now the installer will run asterisk -V to get the version, instead of asterisk -rx 'core show version'. This resolves things for me.

You may also want to run yum install jansson jansson-devel as well, to resolve the missing file errors.