最近需要从rocketmq的队列里读取数据, 显示安装了rocketmq-python跑了几天,后面发现更新里面说代码已经挪位置了(奇怪,我是看到英文的update readme.md才发现.....),呼~,果断重装了 rocketmq-client-python也是绕了个大圈,相关文档也比较少
rocketmq python库在GitHub地址:https://github.com/apache/rocketmq-client-python
按照页面说明先安装依赖:librocketmq
centos 7:
wget https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.0/rocketmq-client-cpp-2.0.0-centos7.x86_64.rpm
sudo rpm -ivh rocketmq-client-cpp-2.0.0-centos7.x86_64.rpm
再安装 rocketmq-client-python
pip install rocketmq-client-python
本以为可以开心的跑起来了,但是问题多多: OSError了,缺少动态链接库
先找到.so 文件的路径
find / -name librocketmq.so
再执行
ln -s /where/you/install/lib/librocketmq.so /usr/lib
sudo ldconfig
终于跑起来了