The following changes solved two problems:
Firstly, the environment variable LD_LIBRARY_PATH is deleted by
Ubuntu for security reasons. Additional paths have to be added
to a new file in the directory /etc/ld.so.conf.d
For example by doing
sudo gedit /etc/ld.so.conf.d/ros2.conf
and adding the line:
Replace <username> with your own username.
Furthermore, one package was missing:
sudo apt-get install libpocofoundation9v5
Now I get a different error message:
terminate called after throwing an instance of 'std::runtime_error'
what(): could not create publisher: type support not from this implementation, at /home/rosbuild/ci_scripts/ws/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/functions.cpp:782, at /home/rosbuild/ci_scripts/ws/src/ros2/rcl/rcl/src/rcl/publisher.c:81
Aborted (core dumped)
Any idea, how to fix this?