# How to change rpath value for a library
To change the rpath value to the folder where the lib file is located:
```
$ chrpath -r '$ORIGIN' libexamplelibrary.so
```
If the library has not previously defined rpath value, you have to set it with:
```
$ patchelf --set-rpath '$ORIGIN' libexamplelibrary.so
```