我刚刚登录到我新购买的使用 debian 的 VPS 服务器并尝试安装 apache2,以下是以 root 身份发生的情况:
vs12-101:/# apt-get install apache2
Reading package lists... Done
Building dependency tree... Done
apache2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
6 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up ssl-cert (1.0.23) ...
hostname: Unknown host
make-ssl-cert: Could not get FQDN, using "vs12-101".
make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run
make-ssl-cert: make-ssl-cert generate-default-snakeoil --force-overwrite
make-ssl-cert: again.
/usr/sbin/make-ssl-cert: line 74: mktemp: command not found
dpkg: error processing ssl-cert (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postfix:
postfix depends on ssl-cert; however:
Package ssl-cert is not configured yet.
dpkg: error processing postfix (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of at:
at depends on exim4 | mail-transport-agent; however:
Package exim4 is not installed.
Package mail-transport-agent is not installed.
Package postfix which provides mail-transport-agent is not configured yet.
dpkg: error processing at (--configure):
dependency problems - leaving unconfigured
Setting up klogd (1.5-5) ...
Stopping kernel log daemon... failed!
Starting kernel log daemon...
并且它一直保持这种状态,请帮助我解决这个问题。
问候
答案1
关键的一行可能是这样的:
/usr/sbin/make-ssl-cert: line 74: mktemp: command not found
dpkg: error processing ssl-cert (--configure):
subprocess post-installation script returned error exit status 1
这意味着由于缺少命令,ssl-cert 的配置失败mktemp
。要修复,请尝试安装包mktemp
。然后执行
dpkg --configure --pending
完成所有未配置包的配置。
即便如此,这还是很奇怪。mktemp 在 Debian 中被标记为“必需”,这意味着它应该始终安装。您是否对 dpkg 或 apt-get 使用了某些 --force 选项?您的系统似乎出了问题。