我正在尝试在我的电脑上(Ubuntu)安装Torch。我按照Torch网站上描述的步骤进行操作。但是,在我运行时
$./install.sh
我收到了以下错误信息:
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:
CUDA_cublas_device_LIBRARY (ADVANCED)
linked by target "THC" in directory /home/leonardo/torch/extra/cutorch/lib/THC
所以我尝试分析CMake日志,发现如下错误:
/home/leonardo/torch/extra/cutorch/build/CMakeFiles/CMakeTmp/src.c:5:20: error: ‘luaL_setfuncs’ undeclared (first use in this function); did you mean ‘lua_setfenv’?
long i = sizeof(&luaL_setfuncs);
^~~~~~~~~~~~~
lua_setfenv
/home/leonardo/torch/extra/cutorch/build/CMakeFiles/CMakeTmp/src.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
CMakeFiles/cmTC_0eb19.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_0eb19.dir/src.c.o' failed
我为什么会遇到这个错误?该怎么解决?
抱歉我的英语不太好,如果有人不理解,请告诉我用其他方式解释。感谢所有帮助过我的人。
PS:在所有这些之前我安装了NVidia CUDA工具包,可能是因为它的缘故,Torch出了点问题。
CUDA_cublas_device_LIBRARY
变量,没有被找到。根据变量名,这是cublas_device
库。我不是CUDA方面的专家,所以无法建议在哪里搜索此库,甚至是否应该存在。但是项目需要它。至于CMakeLog.txt
中的编译错误,很可能只是检查函数/变量luaL_setfuncs
是否存在。根据检查结果,项目应相应地进行配置。不用担心。 - Tsyvarev