[ubuntu18.04][ros2-dashing] failed to load entry point issue
I am trying to run ros2 commands but with any of them I get a similar failure (see below).
edit: from further debugging (BTW it was working perfectly yesterday 24/11/2020) I guess that the LD_LIBRARY_PATH is not loaded or used by python in order to find and load the plugins libraries...
my configuration is Ubunut18.04, re-preempt, ROS2-binary Dashing:
$ env | grep ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/opt/openrobots/share:
ROS_DISTRO=dashing
$ env | grep dashig
LD_LIBRARY_PATH=/opt/ros/dashing/opt/yaml_cpp_vendor/lib:/opt/ros/dashing/opt/rviz_ogre_vendor/lib:/opt/ros/dashing/lib:/opt/openrobots/lib/dynamic-graph-plugins:/opt/openrobots/lib:
AMENT_PREFIX_PATH=/opt/ros/dashing
PYTHONPATH=/opt/ros/dashing/lib/python3.6/site-packages:/opt/openrobots/lib/python3.6/site-packages:
PATH=/opt/ros/dashing/bin:/opt/openrobots/bin:/home/mnaveau/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:bin:/usr/games:/usr/local/games:/snap/bin
ROS_DISTRO=dashing
moreover it happens from python with a simple:
$ ipython
Python 3.6.9 (default, Oct 8 2020, 12:12:24)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import rclpy
In [2]: rclpy.ok()
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-1fc2aba2165f> in <module>
----> 1 rclpy.ok()
/opt/ros/dashing/lib/python3.6/site-packages/rclpy/utilities.py in ok(context)
46 def ok(*, context=None):
47 if context is None:
---> 48 context = get_default_context()
49 return context.ok()
50
/opt/ros/dashing/lib/python3.6/site-packages/rclpy/utilities.py in get_default_context(shutting_down)
29 global g_default_context
30 if g_default_context is None:
---> 31 g_default_context = Context()
32 if shutting_down:
33 old_context = g_default_context
/opt/ros/dashing/lib/python3.6/site-packages/rclpy/context.py in __init__(self)
26
27 def __init__(self):
---> 28 from rclpy.impl.implementation_singleton import rclpy_implementation
29 self._handle = rclpy_implementation.rclpy_create_context()
30 self._lock = threading.Lock()
/opt/ros/dashing/lib/python3.6/site-packages/rclpy/impl/implementation_singleton.py in <module>
29 from rclpy.impl import _import
30
---> 31 rclpy_implementation = _import('._rclpy')
32 rclpy_action_implementation = _import('._rclpy_action')
33 rclpy_logging_implementation = _import('._rclpy_logging')
/opt/ros/dashing/lib/python3.6/site-packages/rclpy/impl/__init__.py in _import(name)
20 def _import(name):
21 try:
---> 22 return importlib.import_module(name, package='rclpy')
23 except ImportError as e:
24 if e.path is None:
/usr/lib/python3.6/importlib/__init__.py in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
128
ImportError: librclpy_common.so: cannot open shared object file: No such file or directory
The C extension '/opt/ros/dashing/lib/python3.6/site-packages/rclpy/_rclpy.cpython-36m-x86_64-linux-gnu.so' failed to be imported while being present on the system. Please refer to 'https://index.ros.org/doc/ros2/Troubleshooting/Installation-Troubleshooting/#import-failing-even-with-library-present-on-the-system' for possible solutions
Error received: $ ros2 topic list
Failed to load entry point 'launch': librclpy_common.so: cannot open shared object file: No such file or directory
The C extension '/opt/ros/dashing/lib/python3.6/site-packages/rclpy/_rclpy.cpython-36m-x86_64-linux-gnu.so' failed ...