While I compile the code in Makefile, I've put LINKPATH = -L/usr/local/lib in the g++ line. And of course "libconfig++.so.9" is under /usr/local/lib
But when I execute the executable file, it still says cannot find libconfig++.so.9.
Anyone knows why?? Appreciate any help.
Fix ing 'cannot open shared object file: No such file or directory' error. One quick way to fix this “error while loading shared libraries” automatically is to use ldconfig. This one liner should solve the problem in most cases.
If you want to open a shared-library file, you would open it like any other binary file -- with a hex-editor (also called a binary-editor). There are several hex-editors in the standard repositories such as GHex (https://packages.ubuntu.com/xenial/ghex) or Bless (https://packages.ubuntu.com/xenial/bless).
You should define LD_LIBRARY_PATH. For example:
export LD_LIBRARY_PATH=/usr/local/lib
or just use
sudo ldconfig -v
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With