# after installing he can't find Qt6Core.so.6 but the file is there

**URL:** <https://discourse.cmake.org/t/after-installing-he-cant-find-qt6core-so-6-but-the-file-is-there/9235>\
**Category:** Code\
**Created:** [October 21, 2023, 9:20pm UTC](https://discourse.cmake.org/t/after-installing-he-cant-find-qt6core-so-6-but-the-file-is-there/9235 "2023-10-21T21:20:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bytec0unter](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bytec0unter/32/3932_2.png) [@bytec0unter](https://discourse.cmake.org/u/bytec0unter)\
**Post date:** [October 21, 2023, 9:20pm UTC](https://discourse.cmake.org/t/after-installing-he-cant-find-qt6core-so-6-but-the-file-is-there/9235/1 "2023-10-21T21:20:15Z")

</div>

the error messsage is like “…/out/bsApplication: /lib/x86\_64-linux-gnu/libQt6Core.so.6: version `Qt\_6.6’ not found (required by …/out/bsApplication)” when i try to run the exe (linux).

here is my CMakeLists.txt: [debian Pastezone](https://paste.debian.net/1295826/)

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [October 21, 2023, 11:24pm UTC](https://discourse.cmake.org/t/after-installing-he-cant-find-qt6core-so-6-but-the-file-is-there/9235/2 "2023-10-21T23:24:00Z")

</div>

It found `libQt6Core.so.6`, but it is too old. You _built_ against 6.6, but at runtime it finds something older (whatever you have installed distro-wide). I think you may need to play with RPATH settings; of note `CMAKE_INSTALL_RPATH_USE_LINK_PATH` is probably the easiest here.

---

<div class="post-metadata">

**Author:** ![bytec0unter](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bytec0unter/32/3932_2.png) [@bytec0unter](https://discourse.cmake.org/u/bytec0unter)\
**Post date:** [October 22, 2023, 4:53am UTC](https://discourse.cmake.org/t/after-installing-he-cant-find-qt6core-so-6-but-the-file-is-there/9235/3 "2023-10-22T04:53:46Z")

</div>

added

set\_target\_properties(${PROJECT\_NAME} PROPERTIES INSTALL\_RPATH “${QT6\_PATH}/lib”)

and now it’s working!Ty for pointing me in the right direction

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [October 22, 2023, 3:44pm UTC](https://discourse.cmake.org/t/after-installing-he-cant-find-qt6core-so-6-but-the-file-is-there/9235/4 "2023-10-22T15:44:14Z")

</div>

You probably want `set_property(TARGET ${PROJECT_NAME} APPEND …)`, but that works if you don’t have any other project-wide RPATH settings.
