# error while loading shared libraries: libwhisper.so.1: cannot open shared object file: No such file or directory

**URL:** https://discourse.cmake.org/t/error-while-loading-shared-libraries-libwhisper-so-1-cannot-open-shared-object-file-no-such-file-or-directory/13409
**Category:** Usage
**Tags:** os:linux, tool:cmake
**Created:** [January 16, 2025, 3:01pm UTC](https://discourse.cmake.org/t/error-while-loading-shared-libraries-libwhisper-so-1-cannot-open-shared-object-file-no-such-file-or-directory/13409 "2025-01-16T15:01:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Raphy](https://discourse.cmake.org/user_avatar/discourse.cmake.org/raphy/32/4087_2.png) [@Raphy](https://discourse.cmake.org/u/Raphy)
#### Post date: [January 16, 2025, 3:01pm UTC](https://discourse.cmake.org/t/error-while-loading-shared-libraries-libwhisper-so-1-cannot-open-shared-object-file-no-such-file-or-directory/13409/1 "2025-01-16T15:01:01Z")

</div>

I installed whisper in MyPrj :

```
~/Downloads/whisper.cpp$ cmake --install builddir/ --prefix=/home/me/MyPrj/src/whisperLib
-- Install configuration: "Release"
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so.1.7.4
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so.1
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/lib/libwhisper.so.1.7.4" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so
-- Installing: /home/me/MyPrj/src/whisperLib/include/whisper.h
-- Installing: /home/me/MyPrj/src/whisperLib/lib/cmake/whisper/whisper-config.cmake
-- Installing: /home/me/MyPrj/src/whisperLib/lib/cmake/whisper/whisper-version.cmake
-- Installing: /home/me/MyPrj/src/whisperLib/lib/pkgconfig/whisper.pc
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libggml-cpu.so
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/lib/libggml-cpu.so" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libggml.so
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/lib/libggml.so" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-cpu.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-alloc.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-backend.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-blas.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-cann.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-cuda.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-kompute.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-opt.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-metal.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-rpc.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-sycl.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-vulkan.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/gguf.h
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libggml-base.so
-- Installing: /home/me/MyPrj/src/whisperLib/bin/whisper-cli
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/bin/whisper-cli" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/bin/whisper-bench
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/bin/whisper-bench" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/bin/whisper-server
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/bin/whisper-server" to ""

/MyPrj/src/whisperLib$ ls
bin include lib

/MPrj/srs/whisperLib$ ls ./lib/
cmake libggml-cpu.so libwhisper.so libwhisper.so.1.7.4
libggml-base.so libggml.so libwhisper.so.1 pkgconfig

```

in CMakeLists.txt I’ve put :

```
add_library(libwhisper SHARED IMPORTED)
set_target_properties(libwhisper PROPERTIES
    IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/src/whisperLib/lib/libwhisper.so"
    IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/src/whisperLib/lib/libwhisper.so.1"
    IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/src/whisperLib/lib/libwhisper.so.1.7.4"
    INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/src/whisperLib/include"

    target_link_libraries(whisper)
)

```

But executing I get :

```
error while loading shared libraries: libwhisper.so.1: cannot open shared object file: No such file or directory

```

cmake version 3.28.3  
OS: Ubuntu 24.04

How make the libwhisper visible?
