Home | Tutorials | Wiki | Issues
Ask Your Question
0

On Ubuntu 12.04 libgazebo_common.so.1 not found

asked 2013-04-11 09:17:29 -0500

vedmathai gravatar image

Hi I am using ubuntu 12.04 and have installed gazebo by downloading the tarball file and following what was given on the install page(http://gazebosim.org/wiki/1.6/install) but when it comes to the last step: that is typing 'gazebo' into the terminal, this is what I get.

gazebo: error while loading shared libraries: libgazebo_common.so.1: cannot open shared object file: No such file or directory

I tried checking the answers on these pages http://answers.gazebosim.org/question... and http://answers.gazebosim.org/question...

Both of them had the same question, and their answers worked for the ones who had asked but not for me. As on the install page my installation was done at the default location, as I didn't specify anything.

edit retag flag offensive close merge delete

Comments

try source /usr/share/gazebo/setup.sh

skhan gravatar imageskhan ( 2013-04-11 09:28:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-11 10:22:56 -0500

gerkey gravatar image

tl;dr:

sudo bash -c "echo /usr/local/lib >> /etc/ld.so.conf"
sudo ldconfig

First, let's understand the situation:

ldd `which gazebo` | grep "not found"

That will give you a list of the libraries that the executable needs, but that the loader can't find. Probably libgazebo_common.so will be in that list, likely along with many other lib_gazebo* libraries.

If you did a default install, it went into /usr/local. By default, your system loader might be configured not to look in /usr/local/lib. To test that, add that directory to your LD_LIBRARY_PATH:

LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ldd `which gazebo` | grep "not found"

If that gives you an empty list, then you're ready to go, in which case you run gazebo like so:

LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH gazebo

or:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
gazebo

But it's better not to have to remember that. So you can configure your system to look in /usr/local/lib for libraries:

sudo bash -c "echo /usr/local/lib >> /etc/ld.so.conf"
sudo ldconfig

That should work for gazebo and for anything else that you install to /usr/local.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-04-11 09:17:29 -0500

Seen: 903 times

Last updated: Apr 11 '13