how to fix ,while compiling ,errors like “Could not find a package configuration file provided by “Qt5″”


for example :

CMake Error at CMakeLists.txt:19 (find_package): 
  Could not find a package configuration file provided by "Qt5" (requested 
  version 5.6.0) with any of the following names: 
 
    Qt5Config.cmake 
    qt5-config.cmake

just do this

  1. install apt-file: sudo apt-get install apt-file
  2. update apt-file’s database: apt-file update
  3. search with : apt-file search Qt5Config.cmake

in one line

a="YOURKEY" ; sudo apt-get install apt-file ; apt-file update ;apt-file search "$a"

so in ours example :

a="Qt5Config.cmake" ; sudo apt-get install apt-file ; apt-file update ;apt-file search "$a"

that give us

libaccounts-qt5-dev: /usr/lib/x86_64-linux-gnu/cmake/AccountsQt5/AccountsQt5Config.cmake
libphonon4qt5-dev: /usr/lib/x86_64-linux-gnu/cmake/phonon4qt5/Phonon4Qt5Config.cmake
libsignon-qt5-dev: /usr/lib/x86_64-linux-gnu/cmake/SignOnQt5/SignOnQt5Config.cmake
libtelepathy-qt5-dev: /usr/lib/x86_64-linux-gnu/cmake/TelepathyQt5/TelepathyQt5Config.cmake
qtbase5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake
qtbase5-gles-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake

so we need to install : qtbase5-dev #for example i mean you could even install others but because i am compiling plasma stuff this should be fine

Advertisements

2 Responses to how to fix ,while compiling ,errors like “Could not find a package configuration file provided by “Qt5″”

  1. Sys says:

    Thanks!

    One question: should it be “update” instead of “udpate”?

  2. nowardev says:

    yep! thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: