Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

error while loading shared libraries: libPocoNet.so.60: cannot open shared object file: No such file or directory

Ask Question /home/sandeep/server2/poco/cmake-build/lib/libPocoNet.so /home/sandeep/server/cmake_build/lib/libPocoNet.so /home/sandeep/server/poco/cmake_build/lib/libPocoNet.so /home/sandeep/server/poco/lib/Linux/x86_64/libPocoNet.so /usr/local/lib/libPocoNet.so

to compile code I am using

g++ poco.cpp  -lPocoNet

while execution

I am getting the error error while loading shared libraries: libPocoNet.so.60: cannot open shared object file: No such file or directory

how I built the source

$ git clone -b master https://github.com/pocoproject/poco.git
$ cd poco
$ mkdir cmake-build
$ cd cmake-build
$ cmake .. && cmake --build .
$ sudo cmake --build . --target install
$ cd ..
$ ./configure
$ make -s -j4
$ cd cmake-build
$ make -s -j4
$ cd ..
$ sudo make install
$ cd cmake-build
$ sudo make install

-----------solved using-------------------

sandeep@sandeep:~$ LD_LIBRARY_PATH=/usr/local/lib
sandeep@sandeep:~$ export LD_LIBRARY_PATH
sandeep@sandeep:~$ g++ poco.cpp -lPocoNet
sandeep@sandeep:~$ ./a.out

if all necessary libs added to your CMakeList.txt just run the below line and run a.out app.

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

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.