在 Debian 上安装 Erlang 和 RabbitMQ - 软件包问题

在 Debian 上安装 Erlang 和 RabbitMQ - 软件包问题

我正在尝试设置 RabbitMQ,但我的依赖项出现了一些问题。我正在运行 Debian 7.1,它将用作服务器,因此没有桌面环境。我尝试使用 aptitude 安装 rabbitmq-server:

$ apt-get install rabbitmq-server 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Package rabbitmq-server is not available, but is referred to by another package. 
This may mean that the package is missing, has been obsoleted, or is only available from another source.
E: Package 'rabbitmq-server' has no installation candidate

从 RabbitMQ 站点获取 .deb 文件会产生以下依赖性错误:

$ dpkg -i rabbitmq-server_3.1.3-1_all.deb
Selecting previously unselected package rabbitmq-server.
(Reading database ... 31422 files and directories currently installed.)
Unpacking rabbitmq-server (from rabbitmq-server_3.1.3-1_all.deb) ...
dpkg: dependency problems prvent configuration of rabbitmq-server:
 rabbitmq-server depends on erlang-nox (>= 1:12.b.3) | esl-erlang; however:
  Package erlang-nox is not installed.
  Package esl-erlang is not installed.

尝试单独安装 erlang-nox 会产生类似的结果:

$ apt-get install erlang-nox
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Package erlang-nox is not available, but is referred to by another package. 
This may mean that the package is missing, has been obsoleted, or is only available from another source.
E: Package 'erlang-nox' has no installation candidate

我的信息来源列表如下:

$ cat /etc/apt/sources.list
...
deb http://security.debian.org wheezy/updates main contrib
deb-src http://security.debian.org wheezy/updates main contrib
#deb http://www.rabbitmq.com/debian testing main 

最后一行是在我通过上述步骤安装 rabbiqmq-server 失败后添加的,但也不起作用。

我尝试手动安装 erlang(编译并使用 make install),但 rabbitmq 仍然抱怨它并且无法安装。

有什么迹象表明这里可能出了什么问题?

答案1

sources.list缺少主 Debian 存储库。添加此行/etc/apt/sources.list并尝试rabbitmq-server再次安装:

deb http://ftp.us.debian.org/debian stable main contrib non-free

如你看到的这里rabbitmq-server确实在主 Debian 存储库中,因此在添加上面的行后,你应该能够使用

sudo apt-get install rabbitmq-server 

只需确保选择一个Debian 镜像距离您较近,并相应地编辑 deb 行。

相关内容