1

Im trying to setup libwebsock, simple C websocket library. I followed the installation procedure from INSTALL file, everything went fine. Im able to compile test program given in the examples. But when I want to run my executable, wild error appears:

./echo: error while loading shared libraries: libwebsock.so.1: cannot open shared object file: No such file or directory

I checked /usr/local/lib twice, libwebsock.so.1 exists and is doing very well. I also tried copying the lib to the echo folder (so its placed next to binary), still same error. It's quite funny for me:

shadowz@Ubu:~/WebSocket$ ls
echo echo.c echo.cpp libwebsock.so.1
shadowz@Ubu:~/WebSocket$ ./echo
./echo: error while loading shared libraries: libwebsock.so.1: cannot open shared object file: No such file or directory

Any suggestions? Im running out of ideas...

3

Try running ldconfig manually (as root) in case it wasn't run during installation of the libs. The shared linker uses a cache to look up shared libraries, and ldconfig is needed to update it.

1

I had a similar issue, but for a different application (Tecplot 2008) and libXpm.so.4 was missing although libxpm seemed to be installed. Turns out I was using a 64-bit OS, and the application was looking for the 32-bit libraries. I'm using Manjaro (Arch linux based) and so installing the following did the trick:

sudo pacman -S multilib-devel
sudo pacman -S lib32-libxpm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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