CMake not find some QT5 packages

Hi friends, I’m using the translator, my English is medium.

I am trying to install the Otter browser on Lubuntu via CMake / QT5.

I have QT5 installed on /opt/Qt5.14.2 and CMake installed on /home/“user”/cmake-3.17.2-Linux-x86_64

To install the Otter browser I am following the GitHub thread.
I am not going to put the Github link because I can only put 2 links here.

Briefly the GitHub link says to execute the 5 commands below:

mkdir build
cd build
cmake …/
make install

When I type the third command (cmake …/) I get the following: Screenshot

I am also attached to “CMakeOutput.log”: Log

How do I fix this problem?

It looks like CMake found the system Qt rather than yours. You need to tell CMake about your Qt installed in /opt. A typical way to do this would be to set CMAKE_PREFIX_PATH, which you can do like so (make sure you remove any previous build the first time you do this or it will continue to use the system Qt it found previously):

cmake -D CMAKE_PREFIX_PATH=/opt/Qt5.14.2 ..

Depending on what structure is used below /opt/Qt5.14.2, it might be enough to set CMAKE_PREFIX_PATH to just /opt, but you can try both and see what works for you.

Hi friend, I tried it in the two ways shown below:

cmake -DCMAKE_PREFIX_PATH=/opt/Qt5.14.2

Either way I got the same error. See the Sreenshot1 and Screenshot2.

Those screenshots show that you did not clear your build directory first, so it was just using the same location if found before instead of the new location you specified (see my previous comment: “make sure you remove any previous build the first time you do this or it will continue to use the system Qt it found previously”).

Hi, sorry for my ignorance. I am not sure which directory to remove.

In /home/“me” the only unusual directories are “cmake-3.17.2-Linux-x86_64”
and “otter-browser-master”.

In /opt the only unusual directory is “Qt5.14.2”.

You need to remove CMakeCache.txt from the /home/df/otter-browser-master/build directory (or you can just delete everything in that build directory if you prefer).

By the way, your posts are getting flagged as spam due to the links to the screenshots. It is better to cut-and-paste the text output directly in your posts if they are reasonably short.

I uninstalled Qt5.14.2 from /opt and reinstalled in /home/df/Applications/Qt according to the tutorial of the official Qt channel.

Then I removed all the contents of the /home/df/otter-browser-master/build directory
I did not remove the directory, only its contents.

Then I changed the end of the command you showed me.

It looks like this:
cmake -DCMAKE_PREFIX_PATH=/home/df/Applications/Qt

I am still getting the same error.

In order to build, Otter Browser needs one of the three web backends that it supports: QtWebEngine, QtWebKit and Hunspell. CMake didn’t find any of these, so it failed to configure.

You need to install QtWebEngine or QWebKit when installing Qt. AFAIK, they are not part of the default Qt packages.

Hi friend, thank you very much for your help. How to install QtWebEngine or QWebKit when installing Qt?

Really like you said the installation of the latest online installation package does not have this option.