Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was installing rfc5766-turn-server. But it fails to launch with an error:

error while loading shared libraries: libevent_core-2.0.so.5: cannot open shared object file: No such file or directory

Here's a copy-paste of how I did the installation:

$ cd /var/tmp;
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz; tar xvfz libevent-2.0.21-stable.tar.gz; cd libevent-2.0.21-stable; ./configure; make; make install;
wget http://rfc5766-turn-server.googlecode.com/files/turnserver-1.8.6.3.tar.gz ; tar xvfz turnserver-1.8.6.3.tar.gz; cd turnserver-1.8.6.3; ./configure; make; make install;
/var/tmp/turnserver-1.8.6.3/bin/turnserver;

I tried this, but it didn't help (same error):

$ ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5;
/var/tmp/turnserver-1.8.6.3/bin/turnserver ;

EDIT: (without changes if i run as below it runs it, but when i test with client it does not show any kind of logs that TURN is hitting or reached by client)

$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/; 
PATH="bin:../bin:../../bin:${PATH}" turnserver -L 176.34.x.x -a -b /usr/local/etc/turnuserdb.conf -f -r 176.34.x.x
1371111272: RFC 5389/5766/5780/6062/6156 STUN/TURN Server, version Citrix-1.8.6.3 'Black Dow'
1371111272: Config file found: /usr/local/etc/turnserver.conf
1371111272: Listener address to use: 176.34.x.x
1371111272: Config file found: /usr/local/etc/turnserver.conf
1371111272: WARNING: cannot find certificate file: turn_server_cert.pem (1)
1371111272: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly
1371111272: WARNING: cannot find private key file: turn_server_pkey.pem (1)
1371111272: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly
1371111272: Relay address to use: 176.34.x.x
1371111272: IO method (listener thread): epoll
1371111272: WARNING: I cannot start alternative services of RFC 5780 because only one IP address is provided
1371111272: IO method: epoll
1371111272: IPv4. UDP listener opened on : 0.0.0.0:0
1371111272: IPv4. TCP listener opened on : 0.0.0.0:39227
1371111272: IO method (auth thread): epoll
1371111272: IO method (relay thread): epoll
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

First, the obvious question: is that library installed?

Also, is it installed for the right architecture? (E.g. a 32-bit executable requires a 32-bit library, a 64-bit executable requires a 64-bit library.)

If you just added a library to a directory in the system library path, you'll need to run ldconfig as root. There's a cache of installed libraries, and ldconfig rebuilds that cache. If a library is present in a directory but not in the cache, it's not going to be used.

I see you added the library to /usr/local/lib. Most distributions include it in the default library path, but Red Hat doesn't. Add it to /etc/ld.so.conf then run ldconfig.

Run ldd /path/to/excecutable to see where an executable is finding its libraries. When a library is not found, strace /path/to/executable will tell you where the program is looking for it.

share|improve this answer
    
what ever shown above installation, without changeing anything if i do this it runs the application but it could be that still its not running correctly. e.g: [root@ip-10-59-143-73 stund]# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/; PATH="bin:../bin:../../bin:${PATH}" turnserver -L 176.34.x.x -a -b /usr/local/etc/turnuserdb.conf -f -r 176.34.x.x –  YumYumYum Jun 13 '13 at 8:15
    
Please see above EDIT Section. –  YumYumYum Jun 13 '13 at 8:17
1  
@YumYumYum So the program now runs, but doesn't behave correctly. That's a completely different question, not about shared libraries but about rfc5766-turn-server. Ask it separately. –  Gilles Jun 13 '13 at 9:06
add comment

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.