Everything goes well while installing the Nagios 4.0.8 into Ubuntu 10.04 LTS. However Nagios Map section doesn't plotted the maps of the device. Displayed error like this way
G for god and G for google, found the solution like
Install the package
apt-get install libgd2-xpm install libgd2-xpm-dev
cd /home/jpudasaini/nagios-4.0.8/
Configure the package for installation
./configure -with-gd-lib=/usr/local/lib/
make cgis
Then copy it into the sbin directory
cp /home/jpudasaini/nagios-4.0.8/cgi/*.cgi /usr/local/nagios/sbin/
Change the permission for that files.
chown nagios:nagios /usr/local/nagios/sbin/*.cgi