安装依赖库
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
pip install rocketmq-client-python
报错
Traceback (most recent call last):
File "rocket_client.py", line 7, in <module>
from rocketmq.client import PushConsumer, ConsumeStatus
File "/usr/local/lib/python3.8/site-packages/rocketmq/client.py", line 24, in <module>
from .ffi import (
File "/usr/local/lib/python3.8/site-packages/rocketmq/ffi.py", line 42, in <module>
dll = ctypes.cdll.LoadLibrary(_DYLIB_PATH)
File "/usr/local/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary
return self._dlltype(name)
File "/usr/local/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: librocketmq.so: cannot open shared object file: No such file or directory
# 解决
ln -s /usr/local/lib/librocketmq.so /usr/lib
sudo ldconfig