Build slicer error,need your help

hello, when i build slicer, i enter <ccmake -DCMAKE_BUILD_TYPE:STRING=Release DQt5_DIR:PATH=/home/zbs/package/Qt/5.12.2/gcc_64/lib/cmake/Qt5/Qt5Config.cmake …/Slicer>
i meet errors as follows, maybe the reason is i install qt more than one.Could you give me some advice? Thank you very much.

CMake Warning at CMake/SlicerBlockFindQtAndCheckVersion.cmake:22 (find_package):
Found package configuration file:

 /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake

but it set Qt5_FOUND to FALSE so package “Qt5” is considered to be NOT
FOUND. Reason given by package:

Failed to find Qt5 component “Multimedia” config file at
“/usr/lib/x86_64-linux-gnu/cmake/Qt5Multimedia/Qt5MultimediaConfig.cmake”

Failed to find Qt5 component “XmlPatterns” config file at
“/usr/lib/x86_64-linux-gnu/cmake/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake”

Failed to find Qt5 component “Svg” config file at
“/usr/lib/x86_64-linux-gnu/cmake/Qt5Svg/Qt5SvgConfig.cmake”

Failed to find Qt5 component “WebEngine” config file at
“/usr/lib/x86_64-linux-gnu/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake”

Failed to find Qt5 component “WebEngineWidgets” config file at
“/usr/lib/x86_64-linux-gnu/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake”

Failed to find Qt5 component “WebChannel” config file at
“/usr/lib/x86_64-linux-gnu/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake”

Errors occurred during the last pass

Considering setting Qt5_DIR to /home/zbs/package/Qt/5.12.2/gcc_64/lib/cmake/Qt5 instead of /home/zbs/package/Qt/5.12.2/gcc_64/lib/cmake/Qt5/Qt5Config.cmake

For more details, see https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Unix-like

Hi Jean,

I have tried with “cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQt5_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5/ …/…/Slicer” , but still i’m getting same errors.

In your last attempt to configure, you used /usr/lib/x86_64-linux-gnu/cmake/Qt5/ instead of /home/zbs/package/Qt/5.12.2/gcc_64/lib/cmake/Qt5

I suggest the following:
(1) Use the version of Qt5 installed in /home/zbs/package/Qt/5.12.2/
(2) Make sure that WebEngine and QtScript are installed. The files Qt5Script/Qt5ScriptConfig.cmake and Qt5WebEngine/Qt5WebEngineConfig.cmake should exist in the directory /home/zbs/package/Qt/5.12.2/gcc_64/lib/cmake. If not, update your Qt install to install the corresponding components. See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Linux



sudo apt-get install qtmultimedia5-dev