install nagios on my Ubuntu 11.04

Asked by desta on 2012-07-31

I tried to install Nagios with onecmdb, the onecmdb was installed correctly but when I tried to install Nagios, the following error occured:

root@desta-OptiPlex-755:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up nagios3-common (3.2.3-1ubuntu1.2) ...
chown: cannot access `/var/run/nagios3': No such file or directory
dpkg: error processing nagios3-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nagios3-cgi:
 nagios3-cgi depends on nagios3-common (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-common is not configured yet.
dpkg: error processing nagios3-cgi (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of nagios3-core:
 nagios3-core depends on nagios3-common (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-common is not configured yet.
dpkg: error processing nagios3-core (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of nagios3:
 nagios3 depends on nagios3-core (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-core is not configured yet.
 nagios3 depends on nagios3-cgi (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-cgi is not configured yet.
dpkg: error processing nagios3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 nagios3-common
 nagios3-cgi
 nagios3-core
 nagios3
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@desta-OptiPlex-755:~# apt-get install nagios3
Reading package lists... Done
Building dependency tree
Reading state information... Done
nagios3 is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.38-8 linux-headers-2.6.38-8-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up nagios3-common (3.2.3-1ubuntu1.2) ...
chown: cannot access `/var/run/nagios3': No such file or directory
dpkg: error processing nagios3-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nagios3-cgi:
 nagios3-cgi depends on nagios3-common (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-common is not configured yet.
dpkg: error processing nagios3-cgi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nagios3-core:
 nagios3-core depends on nagios3-common (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-common is not configured yet.
dpkg: error processing nagios3-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nagios3:
 nagios3 depends on nagios3-core (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-core is not configured yet.
 nagios3 depends on nagios3-cgi (= 3.2.3-1ubuntu1.2); however:
  Package nagios3-cgi is not configured yet.
dpkg: error processing nagios3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                             No apport report written because MaxReports is reached already
                                    Errors were encountered while processing:
 nagios3-common
 nagios3-cgi
 nagios3-core
 nagios3
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please I Need A Solution For this
THANKS:

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nagios3 Edit question
Assignee:
No assignee Edit question
Last query:
2012-07-31
Last reply:
2012-07-31
N1ck 7h0m4d4k15 (nicktux) said : #1

Hi ,
try
================================
sudo apt-get install -f
sudo apt-get update
sudo mkdir /var/run/nagios3
sudo apt-get dist-upgrade
================================

Thanks

Can you help with this problem?

Provide an answer of your own, or ask desta for more information if necessary.

To post a message you must log in.