1. 程式人生 > >Errors were encountered while processing: rabbitmq-server

Errors were encountered while processing: rabbitmq-server

今天裝openStack環境過程中出現如下錯誤:

Errors were encountered while processing:

 rabbitmq-server

E: Sub-process /usr/bin/dpkg returned an error code (1)

原因是因為/etc/hosts 檔案中的IP與<hostname>對映不正確

解決辦法:

$ hostname
$ sudo vim /etc/hosts
127.0.0.1 localhost
ip <hostname>   
#ip網上ip,<hostname>-機器名