尝试安装 NUT 时出现错误

尝试安装 NUT 时出现错误

我尝试在装有 ubuntu server 12.04 的无头机器上安装 nut,但一直出现此错误:

$ sudo apt-get install nut
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nut is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 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 nut-server (2.6.3-1ubuntu1.1) ...
grep: /etc/nut/nut.conf: No such file or directory
sed: can't read /etc/nut/nut.conf: No such file or directory
dpkg: error processing nut-server (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of nut:
 nut depends on nut-server; however:
  Package nut-server is not configured yet.
dpkg: error processing nut (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a          previous failure.
                          Errors were encountered while processing:
 nut-server
 nut
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

在多次尝试配置 nut 以使其与我的 UPS 配合使用后,我决定卸载所有内容并从头开始。在此卸载过程中,我不知何故从 /etc/nut 中删除了 nut.conf。为了能够再次安装 nut,我必须手动创建此文件并输入MODE=standalone其中。

相关内容