ros-perception / vision_opencv

Apache License 2.0
549 stars 601 forks source link

ImportError: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0 #509

Open TKroos18 opened 1 year ago

TKroos18 commented 1 year ago

When I use some function in cv_bridge, I receive an importerror:

Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 76, in callback self.signalMessage(msg) File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 58, in signalMessage cb((msg + args)) File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 240, in add self.signalMessage(msgs) File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 58, in signalMessage cb(*(msg + args)) File "stretch_ws/src/grasp_logic/scripts/main.py", line 22, in callback color_image = bridge.imgmsg_to_cv2(data1, 'bgr8') File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 163, in imgmsg_to_cv2 dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding) File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding)) File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2 from cv_bridge.boost.cv_bridge_boost import getCvType ImportError: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0

The version of os is Ubuntu 20.04. The version of python is 3.8.16. I create virtual environment with anconda. So what happened and is there a way to use CV-Bridge within conda virtual environment with ROS-Noetic?

2197808908a commented 1 year ago

https://blog.csdn.net/lovely_yoshino/article/details/107288433

bqm1111 commented 8 months ago

@TKroos18 Did you figure out how to fix it?

TKroos18 commented 8 months ago

@TKroos18 Did you figure out how to fix it?

I downgrade my python to 3.8.10.

MyunghyunKim commented 2 months ago

In my case relink the library my python ver = 3.8.19

$ ln -sf /usr/lib/x86_64-linux-gnu/libffi.so.7 ~/anaconda3/envs/[your env name here]/lib/libffi.so.7