# Shared libraries can't be redistributed since they refer to their build path

**URL:** https://discourse.vtk.org/t/shared-libraries-cant-be-redistributed-since-they-refer-to-their-build-path/7892
**Category:** Support
**Created:** [February 22, 2022, 5:48pm UTC](https://discourse.vtk.org/t/shared-libraries-cant-be-redistributed-since-they-refer-to-their-build-path/7892 "2022-02-22T17:48:57Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Martin3d](https://discourse.vtk.org/user_avatar/discourse.vtk.org/martin3d/32/4303_2.png) [@Martin3d](https://discourse.vtk.org/u/Martin3d)
#### Post date: [February 28, 2022, 10:10am UTC](https://discourse.vtk.org/t/shared-libraries-cant-be-redistributed-since-they-refer-to-their-build-path/7892/3 "2022-02-28T10:10:21Z")

</div>

Thank you Paulo, referencing the lib path in `DYLD_LIBRARY_PATH` instead of `java.library.path` solves the problem on macOS. For Windows, I could make it work by adding it to `PATH`. I haven’t tried Ubuntu yet, but I think this will work with `LD_LIBRARY_PATH`.

---

_[View the full topic](https://discourse.vtk.org/t/shared-libraries-cant-be-redistributed-since-they-refer-to-their-build-path/7892)._
