Unable to read /etc/asterisk/asterisk.conf or it was missing a directories section

I have ubuntu 12.4.4 operating system. i have already installed libraries and asterisk. I didnt update and upgrade steps of operating system. B
But when i try to install freepbx in this step i got this error:
[email protected]:/usr/src/freepbx#./install -n
So i got the error message like this:
Reading /etc/asterisk/asterisk.conf…Error!
Unable to read /etc/asterisk/asterisk.conf or it was missing a directories section

@the_passerby You just can’t install FreePBX over Asterisk, it won’t work. FreePBX will take over the system so things need to be installed a certain way when you are doing a manual install.

You should review http://wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+Ubuntu+Server+14.04.2+LTS I know you’re running 12.4.4 but this should be enough to help you get things setup the right way.

Everything is loaded until this error. I dont want to install from the first step of installation. If anyone can just help me about solving this issue so i will be so happy.

@the_passerby Did you install everything like the instructions said? FreePBX expects things to be in certain directories and locations on the server as well as Asterisk and Apache running as the user asterisk. It also needs the ability to access MySQL to create users and tables.

So again, if you didn’t follow the instructions I linked from the Wiki, you’re going to have problems. Does /etc/asterisk/asterisk.conf exist? Is /etc/asterisk owned by asterisk:asterisk? If you already setup MySQL with a user/pass you’ll need to run just ./install so it’s interactive and you can provide the information it’s asking for.

i have to install asterisk and freepbx on ubuntu server? i have installed ubuntu desktop version.

@the_passerby You really shouldn’t be running a desktop GUI on a PBX system. Like I said originally FreePBX needs to take over the system. You need a complete LAMP install plus any of the packages listed in the Wiki page.

The instructions I provided are the proven method for installing FreePBX on Ubuntu, any other way is going to cause problems.