Error installing freepbx it the second time i'm getting this error

After going thru all the installation at the end i’m getting this message, is any one have any idea why it happened .

Warning: fopen(/var/www/html/admin/version.txt): failed to open stream: No such file or directory in /usr/src/freepbx-2.4.1/install_amp on line 1089
[FATAL] Could not open /var/www/html/admin/version.txt for writing

Thanks

I’m a bit green myself but it sounds like the file isn’t there or the rights are set wrong. The directory and files under html/asterisk need to be owned by asterisk.asterisk

chown asterisk.asterisk /var/www/html/admin/version.txt

And check all the files there for ownership. got backup?

There is no files or directory under named /var/www/html/admin/version.txt
only I have var/www/html/ no file in html directory, I guess the directory admin and version.txt ne to be created by freepbx on the installation process.

Well the first thing you should have posted is what OS you are using, I take it you are not installing on centos.
who is the owner of var/www/html/ ?
if it is not asterisk:Asterisk then you have missed a step or two

Yes you right i using Debian VM (virtual Machine), above week a go i installed successful but then after I’ getting those messages all the time. never is been successful installing it again. which also get this message on asterisk saying " can’t open line on /var/run/astersik/asterisk.ctl. exit?
I reinstalling now in other VM machine with a different method and see what happend.
please let me now any subjections.
Thanks

-su: /var/lib/asterisk/bin/retrieve_conf: No such file or directory

and
Warning: fopen(/var/www/html/admin/version.txt): failed to open stream: No such file or directory in /usr/src/freepbx-2.4.1/install_amp on line 1089
[FATAL] Could not open /var/www/html/admin/version.txt for writing
is no file in /var/www/html/ admin neither version.txt.

Why Deb why not use centos ??
Centos will be less of a problem for you.

You need to check the permission and paths
you did not post the
" who is the owner of var/www/html/ ?" answer

Please go the freepbx installation root and install it
usr/src/freepbx/
then run the script
./install_amp
some time that help.