# How to make a library path



## Accidental Brine (Feb 21, 2015)

I have an account on a box, but I'm not root.  I want to add some packages to the system though.  I know I can download them from the ftp sites, but sometimes libraries or homedirs (for programs) are not in the right places (eg not in /usr/local).  Is there a way to tell the programs to look in ~/share/ and ~/lib in addition to /usr/local?


----------



## tobik@ (Feb 21, 2015)

I do not believe this is possible with pre-built packages. However ports can be built and installed into a different prefix. Even then building the port and installing it with pkg(8) might require root privileges. `pkg` modifies the package database stored in /var/db/pkg. Maybe you can override this with a custom pkg.conf and build the packages locally with a different PREFIX and copy them to your box.


----------



## junovitch@ (Feb 23, 2015)

This information regarding the LD_LIBRARY_PATH may be helpful.  See Thread 11864 on how to set it.


----------

