well i managed to fix that problem.
but now when i try to start nagios i am getting the following error:
Error: Could not create external command file '/usr/local/nagios/var/rw/nagios.cmd' as named pipe: (2) -> No such file or directory. If this file already exists and you are sure that another copy of Nagios is not running, you should delete this file.
i am sure no other copy of nagios is ruinning