Click here to Skip to main content
14,977,259 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
My problem is in using shared library
I built and compiled my code in code blocks(on ubuntu os)
program runs okay when I run it through code blocks
but when I want to run it from terminal I am getting following error
error while loading shared libraries: libsnmp++.so.33: cannot open shared object file: No such file or directory


What I have tried:

I copy the .so file in both /code/ and /code/bin/Debug directory but I didn't get response
thanks for your response
Posted
Updated 24-Apr-19 11:15am
Comments
Richard MacCutchan 24-Apr-19 7:08am
   
Check which environment variables need to be set for the system to find the library.
saide_a 24-Apr-19 7:39am
   
many thanks
I add (export LD_LIBRARY_PATH="/usr/local/lib/") in terminal and my problem solved

1 solution

You can add /usr/local/lib to the set of globally searched libraries as follows:
$ sudo echo /usr/local/lib > /etc/ld.so.conf.d/usr-local.conf
$ sudo /usr/sbin/ldconfig
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900