Gazebo | Ignition | Community
Ask Your Question

Running Gazebo without being superuser

asked 2018-11-25 12:00:56 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello everyone, I am going to run Gazebo7 on Ubuntu 16.04. I installed it with ros-kinetic-desktop-full. The command 'sudo gazebo' works without problems. The command 'gazebo' returns: gzserver: error while loading shared libraries: cannot open shared object file: No such file or directory.

Running ldd on gazebo (and on gzserver) I discovered that there is not a dependency on but only And I have it. So I really do not understand why he is complaining on

Moreover, doing:

sudo updatedb

I have no results, while doing locate it returns the path of the library: /home/tobi/.local/lib/

So, my .bashrc file is:

export LD_LIBRARY_PATH=/home/tobi/.local/lib/local/lib:$LD_LIBRARY_PATH
export PATH=/home/tobi/.local/lib/local/bin:$PATH
export PKG_CONFIG_PATH=/home/tobi/.local/lib/local/lib/pkgconfig:$PKG_CONFIG_PATH
source /home/tobi/.local/share/gazebo/

And my file is:

export GAZEBO_MASTER_URI=http://localhost:11345
export GAZEBO_RESOURCE_PATH=/home/tobi/.local/share/gazebo-10:${GAZEBO_RESOURCE_PATH}
export GAZEBO_PLUGIN_PATH=/home/tobi/.local/lib/gazebo-10/plugins:${GAZEBO_PLUGIN_PATH}
export GAZEBO_MODEL_PATH=/home/tobi/.local/share/gazebo-10/models:${GAZEBO_MODEL_PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/tobi/.local/lib/gazebo-10/plugins
export OGRE_RESOURCE_PATH=/usr/lib/x86_64-linux-gnu/OGRE-1.9.0

I have also a folder named gazebo-10 with an identical content. This question and This one did not solve my problem.

Any advice, please? Thanks!

edit retag flag offensive close merge delete


As a side note: why the sudo? I don't think that's advisable.

Sietse gravatar imageSietse ( 2018-11-26 04:21:35 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-25 21:52:36 -0600

chapulina gravatar image

It looks like you've installed more than one version (Gazebo 7 + SDF 4 / Gazebo 10 + SDF 6) and they're getting mixed up.

I recommend you uninstall all of the Gazebo, SDF and Ignition versions and reinstall only the version you want to use.

edit flag offensive delete link more


Thank you, I did in such way. Honestly, I had the same problems installing in Ubuntu 16.04 ros-kinetic-desktop-full OR ros-kinetic-gazebo-9. With one among the two, two versions of gazebo are installed. So, I uninstalled everything, I removed all the related files that were not touch by the apt remove / apt purge, like: gzserver executable, etc. Then I first of all installed the version of gazebo I liked more: gazebo7, gazebo7-common, libgazebo7 (cont.)

Tobi92 gravatar imageTobi92 ( 2018-11-29 05:24:14 -0600 )edit

Second part of the comment: Then I separately installed ros: ros-kinetic-desktop (not desktop-full). Then the integration with gazebo: ros-kinetic-gazebo-X , X =dev, msgs, plugins, ros, ros-pkgs Then I installed python-rosinstall And it worked

Tobi92 gravatar imageTobi92 ( 2018-11-29 05:25:36 -0600 )edit

Question Tools

1 follower


Asked: 2018-11-25 12:00:56 -0600

Seen: 1,351 times

Last updated: Nov 25 '18