Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So here's the short story.

I wanted to compile the latest Transmission client from source but in order to do that I needed the libevent-2 library which is not available from Ubuntu 10.04's repository.

Therefore, I grabbed libevent-2's source code, compiled it and installed it (sudo make install).

I am now able to compile transmission and install it. However, when I try to launch it /usr/local/bin/transmission-gtk, I get the following error:

/usr/local/bin/transmission-gtk: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

However, libevent-2.0.so.5 is in the /usr/local/lib directory instead of /usr/local/lib. Is that possibly the problem? Where should I go from here?

share|improve this question
    
Setting LD_LIBRARY_PATH="/usr/local/lib" seemed to fix my problem. –  Olivier Lalonde Mar 19 '11 at 11:24
    
Always it is better to set such environment variables like below. Either export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib or LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH to ensure that you are losing old ld library path settings. –  Jamess Mar 19 '11 at 14:02
    
Even if you solve your own problem make it an answer so it's obvious to the next person with this problem, thanks! (Incorporate what Jamess said too to make it better) –  Jorge Castro Mar 19 '11 at 16:43

2 Answers 2

up vote 5 down vote accepted

Set LD_LIBRARY_PATH to "/usr/local/lib"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/local/lib" in Bashexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/local/lib"

share|improve this answer

Was unable to set my path right apparently, a symbolic link like this worked:

sudo ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.