Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed nagios messed up the configuration and uninstalled it. Now I am trying to reinstall but I get errors and cant install.

jason@jason-VirtualBox:/etc$ sudo apt-get install nagios3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nagios3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 264 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 `/etc/nagios3/resource.cfg': 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)
jason@jason-VirtualBox:/etc$ 
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Remove /etc/nagios3 directory:

rm -rf /etc/nagios3

And then you can install it again.

Only notice: if you will remove package including it's config files, you have use a --purge option for apt:

apt-get --purge remove nagios3-common
share|improve this answer
    
Thanks. I hadn't uninstall the other Nagios packages. –  Jake Jan 2 '12 at 7:43
add comment

Very easy open synaptic package manager status installed manually you will find there all file give trouble to reinstall nagios3 then command line sudo apt-get install -y nagios3

share|improve this answer
    
He might not be using a GUI. –  Falcon Momot Sep 21 '13 at 19:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.