Freepbx-2.5.1-getting error when installing amp

I am installing it on ubuntu 8.04

/usr/src/freepbx-2.5.1$ sudo ./install_amp
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking user…OK
Checking if Asterisk is running…running with PID: 9986…OK
Checking for /etc/amportal.conf…OK
Reading /etc/amportal.conf…OK
Checking for /etc/asterisk/asterisk.conf…OK
Reading /etc/asterisk/asterisk.conf…OK
Using asterisk as PBX Engine
Checking for Asterisk version…1.4.13
Checking for selinux…sh: getenforce: command not found
OK
Connecting to database…OK
Checking current version of AMP…2.5.1
Installing new FreePBX files…/etc/asterisk/vm_email.inc has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? y
/etc/asterisk/manager.conf has been changed from the original version.
Overwrite (y=yes/a=all/n=no/d=diff/s=shell/x=exit)? a
OK (504 files copied, 0 skipped)
Configuring install for your environment…amportal…freepbx_engine…done
apply username/password changes to conf files…/etc/amportal.conf: line 33: /var/www: is a directory
/etc/amportal.conf: line 43: /var/www/panel: No such file or directory
done
creating missing #include files…OK
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
OK
Setting permissions on files…/etc/amportal.conf: line 33: /var/www: is a directory
/etc/amportal.conf: line 43: /var/www/panel: No such file or directory
/etc/amportal.conf: line 33: /var/www: is a directory
/etc/amportal.conf: line 43: /var/www/panel: No such file or directory
chown: cannot access /admin’: No such file or directory chmod: cannot access/admin’: No such file or directory
chown: missing operand after asterisk:asterisk’ Trychown –help’ for more information.
chmod: missing operand after g+w’ Trychmod –help’ for more information.
chown: cannot access /recordings’: No such file or directory chmod: cannot access/recordings’: No such file or directory
chown: cannot access /_asterisk’: No such file or directory chmod: cannot access/*.pl’: No such file or directory
chmod: cannot access `/safe_opserver’: No such file or directory
OK
Checking for upgrades…No upgrades found
Generating AMP configs…
Generating Configurations.conf, (if Asterisk is not running, you will get an error
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configuraions.conf files

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Running module install.php and install.sql scripts
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …
Warning: require_once(/var/www/html/admin/functions.inc.php): failed to open stream: No such file or directory in /var/lib/asterisk/bin/retrieve_conf on line 183

Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/functions.inc.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/lib/asterisk/bin/retrieve_conf on line 183
Generating AMP configs…OK
Restarting Flash Operator Panel…op_server.pl: no process killed
OK
Checking dashboard…
Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking music…

Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking voicemail…
    Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking infoservices…
    Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking customappsreg…
    Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking featurecodeadmin…
    Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking recordings…
    checking for fcode field…already exists
    checking for fcode_pass field…already exists
    Module successfully installed

The following error(s) occured:

  • Module is already enabled
    installed
    Checking framework…
    The following error(s) occured:
  • Module is already enabled
    enabled
    Checking core…
    Checking if directdids need migrating…already done
    updating zap callgroup, pickupgroup…not needed
    checking for delay_answer field …already exists
    checking for pricid field …already exists
    Checking for Global var RECORDING_STATE…Already exists!
    Module successfully installed

The following error(s) occured:

Thx

Your installation directory structure must not match the default structure that FreePBX is expecting. Since you didn’t use the --webroot command line option to tell it differently, the Installation assumes it is and that is why it is throwing errors because things are not what it expects.