我一直在尝试安装torch,但在运行时遇到以下错误/安装.sh
CMake Error at /usr/share/cmake-2.8/Modules/FindQt4.cmake:664 (message):
Could NOT find QtCore. Check
/home/name/torch/exe/qtlua/build/CMakeFiles/CMakeError.log for more
details.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/home/name/torch/exe/qtlua/build/CMakeFiles/CMakeOutput.log".
Error: Build error: Failed building.
Missing dependencies for qttorch:
qtlua >= 1.0
我已经尝试过使用安装QtCore
sudo apt-get install libqt4-core
但是,我还是得到了一个错误:
Could NOT find QtCore
如上所示。为什么会这样?我该如何解决?
安装时我遵循的步骤:http://torch.ch/docs/getting-started.html#_
编辑(已解决):我不得不使用安装qt4开发工具
apt-get install qt4-dev-tools
我通过在所有CMakeList.txt中将find_package(Qt4 REQUIRED)替换为find_packages(Qt5Widgets)来解决这个问题。
用CMake 检测Qt5