Freepbx.conf cannot be found

/usr/local/src/freepbx location

This is the error I get when I run freepbx ./install -n I wonder if there is a freepbx.conf file, how can I fix this error

Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Yes. Determined Asterisk version to be: 21.6.1
Checking if NodeJS is installed and we can get a version from it…Yes. Determined NodeJS version to be: 20.18.1
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install…Yes (No /etc/freepbx.conf file detected)
Database Root installation checking credentials and permissions…Error!

Are you trying to build dev environment for Freepbx 17 or Freepbx 16?

Best Regards,
Kapil

1 Like

need help for freepbx 17

I wonder if there is such an error in 16?

waiting for your help thanks

We have not yet tried 17 dev environment so may be there is some issue. If Freepbx16 is good for you then please go ahead and try with v16.

Regards
Kapil

thank you, I hope it works for me

@mwhite another case of untested stuff being pushed to production. Can we get some real answers to our concerns?

You can’t use Asterisk 21 with anything lower than FreePBX v17. So if you’re setting this up as a manual install you need to lower your Asterisk version.

hello i have already installed 20.11.1.1 i still encounter the same error i would be very grateful if you can help

Perhaps you should outline how you’re doing all this…

Hi @wosen - Welcome to the forum. This looks like a database error. Did you install MySQL/MariaDB?

If they were using the install script it should have been done for him by the install script.

This is why I’ve asked for a detailed outline on how the install was done.

yes MySQL/MariaDB? installed

Please provide the steps you did for this install. Did you try to install FreePBX v17 using the install script and instructions?

apt-get update
apt-get upgrade
apt -y install build-essential git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev libjansson-dev libxml2-dev uuid-dev default-libmysqlclient-dev htop sngrep lame ffmpeg mpg123
apt -y install git vim curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev expect

apt-get install -y build-essential linux-headers-uname -r openssh-server apache2 mariadb-server mariadb-client bison flex php8.2 php8.2-curl php8.2-cli php8.2-common php8.2-mysql php8.2-gd php8.2-mbstring php8.2-intl php8.2-xml php-pear curl sox libncurses5-dev libssl-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libicu-dev libcurl4-openssl-dev odbc-mariadb libical-dev libneon27-dev libsrtp2-dev libspandsp-dev sudo subversion libtool-bin python-dev-is-python3 unixodbc vim wget libjansson-dev software-properties-common nodejs npm ipset iptables fail2ban php-soap

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
tar xvf asterisk-21-current.tar.gz
cd asterisk-21*/
contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereq install
./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled
make menuselect
make
make install
make samples
make config
ldconfig

groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk:asterisk /etc/asterisk
chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk:asterisk /usr/lib64/asterisk

sed -i ‘s|#AST_USER|AST_USER|’ /etc/default/asterisk
sed -i ‘s|#AST_GROUP|AST_GROUP|’ /etc/default/asterisk
sed -i ‘s|;runuser|runuser|’ /etc/asterisk/asterisk.conf
sed -i ‘s|;rungroup|rungroup|’ /etc/asterisk/asterisk.conf
echo “/usr/lib64” >> /etc/ld.so.conf.d/x86_64-linux-gnu.conf
ldconfig

sed -i ‘s/(^upload_max_filesize = )./\120M/’ /etc/php/8.2/apache2/php.ini
sed -i 's/(^memory_limit = ).
/\1256M/’ /etc/php/8.2/apache2/php.ini
sed -i ‘s/^(User|Group).*/\1 asterisk/’ /etc/apache2/apache2.conf
sed -i ‘s/AllowOverride None/AllowOverride All/’ /etc/apache2/apache2.conf
a2enmod rewrite
systemctl restart apache2
rm /var/www/html/index.html

cat < /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage = 1
EOF

cat < /etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to ‘asteriskcdrdb’ database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF

cd /usr/local/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz
tar zxvf freepbx-17.0-latest-EDGE.tgz
cd /usr/local/src/freepbx/
./start_asterisk start
./install -n

I was doing it according to this plan, but when I heard that freepbx 17 was not ready, I deleted asterisk21 and when I installed version 20.11, I got this error when I ran freepbx.

This isn’t the official way to install FreePBX v17. This was how you did the install before it was released into production.

You were asked if you were trying to install it in a dev environment, which is a specific type of install, and that it what is not tested or ready. A dev environment setup. The standard setup is fine.

The problem you’re having is the attempts to open a database connection are failing. That could be for various reasons. Can you connect to the database as root with no password via the cli?

Also the version you’re trying to install is out of date because there should be more information in the database error on a current release of v17.

I didn’t intend to upload it to the developer environment
I was going to use it for trial purposes, like a call system for my own website.
now I got a different error, I apologise, I am writing late because I have a grandfather to look after.

" asterisk completely cleaned and reinstalled asterisk 20 and freepbx 16 seem to match "

these problems have been solved and now I have a different problem that I don’t want to go crazy about. how does this event seem to work
./start_asterisk start

FIRST ASTERISK
Asterisk Launches

┌──(root㉿)-[/usr/local/src/freepbx]
└─# ./install -n
Assuming you are Database Root
Checking if SELinux is enabled…Not enabled (good)!
Reading /etc/asterisk/asterisk.conf…Completed
I check if Asterisk is working and if we can talk to him as user ‘asterisk’… Error!
Error communicating with asterisk. Make sure that Asterisk is properly installed and running as asterisk user
The asterisk seems to work as an asterisk
Try starting Asterisk in this directory with the command ‘./start_asterisk start’
I’m going to sleep at 00:49. Tomorrow I hope I’ll have solved this problem.