Linux qt gcc-make not found
时间: 2023-09-21 13:13:38 浏览: 151
It seems like you are facing an issue with missing dependencies. To resolve this issue, you can try installing the required dependencies using the following command:
```
sudo apt-get update
sudo apt-get install build-essential qt5-default
```
This will install the necessary packages including GCC and Make for building Qt applications on Linux. Once the installation is complete, try building your application again. It should work without any issues.
相关问题
Running "/usr/bin/cmake /home/zhanghb/Desktop/ImageTool/ImageTool '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ -DCMAKE_C_COMPILER:STRING=/usr/bin/gcc -DCMAKE_PREFIX_PATH:STRING=/home/zhanghb/Qt5.9.1/5.9.1/gcc_64 -DQT_QMAKE_EXECUTABLE:STRING=/home/zhanghb/Qt5.9.1/5.9.1/gcc_64/bin/qmake" in /home/zhanghb/Desktop/ImageTool/build-ImageTool-Desktop_Qt_5_9_1_GCC_64bit-Default. -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: ZLIB_LIBRARY (ADVANCED) linked by target "ImageTool" in directory /home/zhanghb/Desktop/ImageTool/ImageTool -- Configuring incomplete, errors occurred! See also "/home/zhanghb/Desktop/ImageTool/build-ImageTool-Desktop_Qt_5_9_1_GCC_64bit-Default/CMakeFiles/CMakeOutput.log". *** cmake process exited with exit code 1.
这是一个 CMake 配置错误。根据错误日志,您的项目依赖于 ZLib 库,但是 CMake 无法找到该库的位置。请确保已经正确安装 ZLib 库,并且在 CMakeLists.txt 文件中已正确设置 ZLIB_LIBRARY 和 ZLIB_INCLUDE_DIR 变量。如果已经设置但仍然出现问题,请检查这些变量的路径是否正确,并且尝试将 ZLib 库的路径添加到系统环境变量中。如果问题仍然存在,请提供更多信息以便更好地解决问题。
-- Configuring incomplete, errors occurred! See also "/home/zhanghb/Desktop/ImageTool/build-ImageTool-Desktop_Qt_5_9_1_GCC_64bit-Default/CMakeFiles/CMakeOutput.log". CMake Error at CMakeLists.txt:153 (install): install TARGETS given no RUNTIME DESTINATION for executable target "ImageTool". CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: ZLIB_LIBRARY (ADVANCED) linked by target "ImageTool" in directory /home/zhanghb/Desktop/ImageTool/ImageTool *** cmake process exited with exit code 1.
这是一个 CMake 配置错误。根据错误日志,您没有为可执行目标“ImageTool”指定“RUNTIME DESTINATION”选项,导致无法安装该目标。要解决此问题,请在 CMakeLists.txt 文件中为该目标添加以下代码:
```
install(TARGETS ImageTool RUNTIME DESTINATION bin)
```
此外,错误日志还指出 ZLIB_LIBRARY 变量未设置或设置为 NOTFOUND。请确保在 CMakeLists.txt 文件中正确设置了该变量。如果已设置但仍然出现问题,请检查 ZLib 库是否已正确安装并设置了正确的路径。
阅读全文