Linux上的ZeroMQ epgm错误:不支持协议 [英] ZeroMQ epgm error on Linux: Protocol not supported

查看:2519
本文介绍了Linux上的ZeroMQ epgm错误:不支持协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Linux上使用zmq进行多播。我的程序死在试图绑定到epgm地址的行上。

I'm trying to multicast using zmq on Linux. My program dies on the line that tries to bind to the epgm address.

我在VC ++中运行完全相同的代码,而我运行客户端和服务器在同一主机和它运行很好。但是从我在这个网站上的其他程序员读取的zmq不支持环回功能,所以我不能发布和使用epgm在同一主机上接收消息。

I ran the exact same code in VC++ while i was running the client and server both on the same host and it ran fine. However from what i've read by other programmers on this site, zmq does not support loopback functionality so I can't do publishes and receive the messages on the same host using epgm.

我将程序移动到linux框,我收到一个错误。这里是代码和错误,你知道任何机会,如果这个错误有关我使用无效的IP为Linux?

I moved the program to a linux box and I received an error. Here are the code and the error, do you know by any chance if this error has to do with me using an invalid IP for Linux?

zmq::context_t context( 1 );
zmq::socket_t publisher( context, ZMQ_PUB );

publisher.bind( "epgm://224.0.0.1:5555" );

错误行是bind行。

错误是:

terminate called after throwing an instance of 'zmq::error_t'
what():  Protocol not supported

感谢您的帮助

推荐答案

我发现了这个问题的解决方案。

I found the solution to this problem.

显然,当你打算使用zmq的多播(pgm或epgm)请运行./configure并启用pgm,然后再执行make。

Apparently when you intend on using zmq for multicasts (pgm or epgm) you have to run the ./configure with pgm enabled then do a make after.

对于此libpgm是必需的

For this libpgm is required

通过我提取的tar zmq tar文件在文件夹/ foreign /下有一个libpgm tar文件。

In looking through my extracted tar zmq tar file under the folder /foreign/ there is a libpgm tar file.

所以我只是运行:

./configure --with-pgm=libpgm-5.2.122~dfsg

make

sudo make install

这解决了这个问题,我现在可以使用epgm绑定。

This solved the problem and i am able to bind using epgm now.

(显然libpgm的版本将是您的zmq文件夹中的版本)

(obviously the version of libpgm will be the version in your zmq folder)

这篇关于Linux上的ZeroMQ epgm错误:不支持协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆