Adding /usr/local/lib to default path at startup?

I am writing some code that requires a library that has been installed to /usr/local/lib.
In order for my IDE to execute the code at the startup I always rund sudo ldconfig /usr/local/lib.
What is the cannonical way to make this change permanent? β†’ /etc/

1 Like

Maybe some additional information for others with the same problem:
I added the line β€œ/usr/local/lib” verbatim to the file.

1 Like

I’m not sure what extra info, that page gives all the information you need.

ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/

So basically if you either add your library path to /etc/ or create a file with your library paths in file under /etc/ the necessary links and caches are created, you do need to run ldconfig once after having added something there.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.