Gazebo | Ignition | Community
Ask Your Question


asked 2013-03-22 08:36:11 -0500

dereck gravatar image

Installing from source, gazebo compiles and installs without errors but when I attempt to execute...: $ gazebo gazebo: error while loading shared libraries: cannot open shared object file: No such file or directory

I'm sourcing the file, and the environmental variables look fine.

searching for the file with find / -name '' 2>/dev/null returns nothing at all.

It's almost as if it was removed from cmakelists but something is still attempting to link with it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-22 10:44:50 -0500

gerkey gravatar image

After building from source, before running Gazebo, you need to modify LD_LIBRARY_PATH to include /opt/ros/fuerte/lib, which is where the missing library is installed. The easiest way to do that is to source the ROS setup file, which you did before building Gazebo:

. /opt/ros/fuerte/setup.bash

Alternatively, you could set it manually:

export LD_LIBRARY_PATH=/opt/ros/fuerte/lib:$LD_LIBRARY_PATH

You don't need to do this when using the binary packages because the deb-builder adds the above the export line to Gazebo's because it knows that it configured Gazebo to use ROS libraries.

When you encounter these kinds of problems, a good way to check what's missing is:

ldd `which gazebo` | grep "not found"

If that commands returns nothing, then you're all set; otherwise, you still have some missing libraries to be resolved.

edit flag offensive delete link more


Why does Gazebo depend on ROS? I was under the impression that Gazebo could run without ROS installed. I'm also curious why this just started to happen today when it's been fine for weeks... Any ideas?

dereck gravatar imagedereck ( 2013-03-22 14:59:49 -0500 )edit

Gazebo has many optional dependencies, one of which is the ROS urdfdom library. Gazebo can be built without it, but then it cannot load URDF models that are widespread in ROS systems, including drcsim. An alternative way to avoid the problem you've reported here is to configure and build Gazebo from source without first sourcing the ROS setup file. Then you'd end up with a Gazebo that would happily run without LD_LIBRARY_PATH modification.

gerkey gravatar imagegerkey ( 2013-03-22 16:19:48 -0500 )edit

That's just what I was looking for! I must not have had my ROS sauce on my .bashrc while I was building it last week. :) Thank you!

dereck gravatar imagedereck ( 2013-03-22 17:40:34 -0500 )edit

Question Tools


Asked: 2013-03-22 08:36:11 -0500

Seen: 538 times

Last updated: Mar 22 '13