# GDCM not found when ITK 5.0 is installed as shared library

**URL:** https://discourse.itk.org/t/gdcm-not-found-when-itk-5-0-is-installed-as-shared-library/1955
**Category:** Beginner Questions
**Created:** [June 10, 2019, 12:02pm UTC](https://discourse.itk.org/t/gdcm-not-found-when-itk-5-0-is-installed-as-shared-library/1955 "2019-06-10T12:02:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lukas](https://discourse.itk.org/letter_avatar_proxy/v4/letter/l/e9a140/32.png) [@lukas](https://discourse.itk.org/u/lukas)
#### Post date: [June 10, 2019, 12:02pm UTC](https://discourse.itk.org/t/gdcm-not-found-when-itk-5-0-is-installed-as-shared-library/1955/1 "2019-06-10T12:02:22Z")

</div>

Hi all,

When trying to run an application built with ITK 5.0 installed as a shared library, I get the error:

> error while loading shared libraries: libitkgdcmjpeg8-5.0.so.1: cannot open shared object file: No such file or directory

The error does not appear, when running the application with the ITK located in the corresponding build folder.  
The error does also not appear, when running the application with ITK installed as a static library.

I am using Ubuntu 18.04 and Clang 6.0.

Steps to reproduce:

1. Configure ITK-5.0 with BUILD\_SHARED\_LIBS:BOOL=ON and custom install prefix (all other options default)
2. Build and install
3. Build and run an ITK example (e.g. CreateAIndex)

Are there additional options I have to set in CMake, when installing ITK as a shared library?

Cheers,  
Lukas
