无法重新安装Nagios

我安装nagios搞砸了configuration,并卸载它。 现在我正试图重新安装,但我得到错误,无法安装。

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$ 

删除/ etc / nagios3目录:

 rm -rf /etc/nagios3 

然后你可以再次安装它。

只有注意:如果你将删除包括它的configuration文件的包,你可以使用--purge选项的apt:

 apt-get --purge remove nagios3-common 

非常容易开放的突触包pipe理器状态手动安装,你会发现那里所有的文件麻烦重新安装nagios3然后命令行sudo apt-get install -y nagios3