From here: https://stackoverflow.com/a/28327499/462608 I tried this: Here is the output of cmake . This is to show that /opt/Qt5.9.1/ does exist. Here I run the cmake with -DCMAKE option, but the output is still same: Contents of the directory: Answer I installed the following missing packages: Attaching any kind of prefix is not required now: CMakeList: New output: Errors are