Missing libtiff.so.5 when running gazebo Harmonic

Hello,
I am having issues with libtiff.so.5 when running gazebo Harmonic. I recently went from Ubuntu 22.04 to Ubuntu 24.04, then I reinstalled the gazebo harmonic via command

sudo apt-get install ros-jazzy-ros-gz

And after a few solved issues I remained stuck at running simple command:

gz sim

that results in:

user@ubuntu:~$ gz sim
Error while loading the library [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/libgz-sim-physics-system.so]: libtiff.so.5: cannot open shared object file: No such file or directory
[Err] [SystemLoader.cc:107] Failed to load system plugin: (Reason: No plugins detected in library)
- Requested plugin name: [gz::sim::systems::Physics]
- Requested library name: [gz-sim-physics-system]
- Resolved library path: [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/libgz-sim-physics-system.so]
Error while loading the library [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libGzSceneManager.so]: libtiff.so.5: cannot open shared object file: No such file or directory
[GUI] [Err] [Application.cc:556] Failed to load plugin [GzSceneManager] : couldn't load library on path [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libGzSceneManager.so].
Error while loading the library [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libSpawn.so]: libtiff.so.5: cannot open shared object file: No such file or directory
[GUI] [Err] [Application.cc:556] Failed to load plugin [Spawn] : couldn't load library on path [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libSpawn.so].
Error while loading the library [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libVisualizationCapabilities.so]: libtiff.so.5: cannot open shared object file: No such file or directory
[GUI] [Err] [Application.cc:556] Failed to load plugin [VisualizationCapabilities] : couldn't load library on path [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libVisualizationCapabilities.so].
[GUI] [Err] [Gui.cc:508] Failed to load config file[/home/user/.gz/sim/8/gui.config].

I have tried to install the missing library via command:

sudo apt install --reinstall libtiff5-dev

but it installs libtiff.so.6 instead of requested version .5.
I have tried very risky solution, that creates a symlink named libtiff.so.5, that points to libtiff.so.6, which allows me to start the gazebo sim, but then when I wanted to use in my .sdf file a gazebo plugins like:

<plugin name="gz::sim::systems::NavSat" filename="/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/libgz-sim-navsat-system.so">
</plugin>

it results into the state, that gazebo opens the gui, but it is empty and no object is loaded and no error is logged. I believe, that this issue is connected to the libtiff library.
Does anyone have the same issue before? I tried the gazebo discord, but unfortunately no one responded.

Thank you guys.

This is probably the root of the problems since tiff version in 22.04 is 5 but 24.04 has 6.

If you run apt-cache show libtiff5-dev you will find that it is a transitional package that is only bringing into the system libtiff-dev (unversioned) which in 24.04 is using the 6.x series.

:cold_sweat:

My feeling is that you are somehow using 22.04 (Jammy) packages on 24.04 (Noble). Let’s try to replace them:

# should tell you a little bit of the versions installed.
dpkg -l | grep ros-jazzy-ros-gz

You will probably found some versions that do not belong to Noble. As an example of my system:

❯ dpkg -l | grep ros-jazzy-ros-gz
ii  ros-jazzy-ros-gz                                 1.0.7-1noble.20250117.051409              amd64        Meta-package containing interfaces for using ROS 2 with Gazebo simulation.
ii  ros-jazzy-ros-gz-bridge                          1.0.4-1noble.20240922.090843              amd64        Bridge communication between ROS and Gazebo Transport
ii  ros-jazzy-ros-gz-image                           1.0.4-1noble.20240922.095148              amd64        Image utilities for Gazebo simulation with ROS.
ii  ros-jazzy-ros-gz-interfaces                      1.0.3-1noble.20240723.114004              amd64        Message and service data structures for interacting with Gazebo from ROS2.
ii  ros-jazzy-ros-gz-sim                             1.0.5-1noble.20241015.115302              amd64        Tools for using Gazebo Sim simulation with ROS.
ii  ros-jazzy-ros-gz-sim-demos                       1.0.4-1noble.20240922.111358              amd64        Demos using Gazebo Sim simulation with ROS.

I would remove all the packages and reinstall them, something like:

apt-get remove ros-jazzy-ros-gz* && apt-get install ros-jazzy-ros-gz

Your try using:

sudo apt-get install ros-jazzy-ros-gz

was good expecting that ros-jazzy-ros-gz updates everything needed. However the package simply depends on : ros-jazzy-ros-gz-bridge, ros-jazzy-ros-gz-image, ros-jazzy-ros-gz-sim, ros-jazzy-ros-gz-sim-demos, ros-jazzy-ros-workspace

❯ apt-cache show ros-jazzy-ros-gz
Package: ros-jazzy-ros-gz
Version: 1.0.7-1noble.20250117.051409
Architecture: amd64
Maintainer: Aditya Pande <adityapande@intrinsic.ai>
Installed-Size: 43
Depends: ros-jazzy-ros-gz-bridge, ros-jazzy-ros-gz-image, ros-jazzy-ros-gz-sim, ros-jazzy-ros-gz-sim-demos, ros-jazzy-ros-workspace
Priority: optional
Section: misc
Filename: pool/main/r/ros-jazzy-ros-gz/ros-jazzy-ros-gz_1.0.7-1noble.20250117.051409_amd64.deb
Size: 6918
SHA256: 84241a15334130d911fb9b84f4e5e9c916c5487ad5b967a9c8bf2b97d2afb04a
SHA1: 10ad6e2a5c7bf58df3ff3ec9c2308cfc79f0742e
MD5sum: e44907c35676d40591d741b9cd9012ab
Description: Meta-package containing interfaces for using ROS 2 with Gazebo simulation.
Description-md5: 

so if any version of the packages is in the system it will not upgrade any of them.