【发布时间】:2019-03-01 06:56:24
【问题描述】:
我正在尝试在我的 PC (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 Toolkit,也许 Torch 很“奇怪”,因为它。
【问题讨论】:
-
您得到的“CMake 错误”表示尚未找到对应于
CUDA_cublas_device_LIBRARY变量的库。根据变量名,这是cublas_device库。我不是 CUDA 专家,因此无法建议在哪里搜索这个库,即使它应该存在。但项目需要它。至于CMakeLog.txt中的编译错误,很可能只是检查,函数/变量luaL_setfuncs是否存在。根据检查结果,项目应进行相应的配置。不用担心。
标签: linux cmake installation torch