你好,我想在我的 Ubuntu 12.04 上安装 ruby。我尝试使用以下命令,
sudo apt-get install curl
但出现以下错误。
The hostname -f command returned: $1
Your system needs to have a fully qualified domain name (fqdn) in
order to install the var-qmail packages.
Installation aborted.
dpkg: error processing qmail (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of qmail-run:
qmail-run depends on qmail (>= 1.06-2.1); however:
Package qmail is not configured yet.
dpkg: error processing qmail-run (--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:
qmail
qmail-run
E: Sub-process /usr/bin/dpkg returned an error code (1)
如何解决此错误。需要帮助。我正在使用 ubuntu 12.04
答案1
问题是你没有完整限定域名 (FQDN)在您的/etc/hosts
文件中。
/etc/hosts
以下是应包含内容的示例:
root@precise64:/home/vagrant# cat /etc/hosts 127.0.1.1 precise64.example.com precise64 # 对于支持 IPv6 的主机,以下几行是理想的 ::1 ip6-本地主机 ip6-环回 fe00::0 ip6-本地网络 ff00::0 ip6-mcast前缀 ff02::1 ip6-所有节点 ff02::2 ip6-所有路由器
更正文件后/etc/hosts
,你可以使用以下命令检查 FQDN:hostname -f
root@precise64:/home/vagrant# 主机名 -f precise64.example.com
sudo apt-get install qmail
完成更改后您就应该能够这样做。