apache / rocketmq-client-python

Apache RocketMQ python client
https://rocketmq.apache.org/
Apache License 2.0
271 stars 95 forks source link

librocketmq.so: undefined symbol: CreateOrderlyProducer #115

Closed tankcong closed 2 years ago

tankcong commented 3 years ago

BUG REPORT

  1. Please describe the issue you observed:

running samples/producer.py with error:

Traceback (most recent call last): File "producer.py", line 19, in from rocketmq.client import Producer, Message, TransactionMQProducer, TransactionStatus File "/usr/local/lib64/python3.6/site-packages/rocketmq/client.py", line 24, in from .ffi import ( File "/usr/local/lib64/python3.6/site-packages/rocketmq/ffi.py", line 173, in dll.CreateOrderlyProducer.argtypes = [c_char_p] File "/usr/lib64/python3.6/ctypes/init.py", line 356, in getattr func = self.getitem(name) File "/usr/lib64/python3.6/ctypes/init.py", line 361, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /usr/local/lib64/python3.6/site-packages/rocketmq/librocketmq.so: undefined symbol: CreateOrderlyProducer

  1. Please tell us about your environment:

    • CentOS 7
    • python 3.7
    • rocketmq-client-python 1.2.4
    • rocketmq version 4.8.0
    • rocketmq-client-cpp 2.0.0 -centos7-x86_64
ifplusor commented 2 years ago

Please use latest rocketmq-client-cpp

ifplusor commented 2 years ago

Check the declaration of CreateOrderlyProducer in CProducer.h

treelly commented 2 years ago

I have the same problem, my system is linux-ubuntu, how did you solve it

missuor commented 2 years ago

same problem ubuntu 20.04

(ecloud-collector) root@think:~# python -V
Python 2.7.18
(ecloud-collector) root@think:~# pip list
Package                Version
---------------------- ---------
backports-abc          0.5
canal-python           0.4
certifi                2021.10.8
chardet                4.0.0
enum34                 1.1.10
futures                3.3.0
idna                   2.10
pip                    20.3.4
protobuf               3.17.3
requests               2.27.1
rocketmq               0.4.4
rocketmq-client-python 2.0.0
setuptools             44.1.1
singledispatch         3.7.0
six                    1.16.0
tornado                5.1.1
typing                 3.10.0.0
urllib3                1.26.8
wheel                  0.37.1
(ecloud-collector) root@think:~# dpkg -l|grep rocketmq
ii  rocketmq                                   2.0.0                               amd64        This package is C++ client of Apache RocketMQ for debian and its derivertives like Ubuntu.
(ecloud-collector) root@think:~# 
treelly commented 2 years ago

 您好,邮件已收到!

thomaslv2 commented 2 years ago

@missuor You have installed other rocketmq client[rocketmq], you can try: pip uninstall rocketmq pip install rocketmq-client-python Hope this works for you!

treelly commented 2 years ago

 您好,邮件已收到!

fei-ghb commented 10 months ago

install rocketmq-client-cpp-2.0.0-centos7-x86_64

treelly commented 10 months ago

 您好,邮件已收到!

Ava-yjt commented 5 months ago

卸载rocketmq-client-python和rocketmq 重新安装rocketmq-client-python和rocketmq-client-cpp,成功解决了这个问题 猜测是新版的rocketmq-client-python和rocketmq包有冲突,只需要安装前者就行

treelly commented 5 months ago

 您好,邮件已收到!