在 xmr-stak 安装(Monero Mining)期间我收到 CUDA TOOLKIT 错误?

在 xmr-stak 安装(Monero Mining)期间我收到 CUDA TOOLKIT 错误?

这是教程

cd xmr-stak-cpu  

sudo cmake  

我收到此错误:

CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") CMake Error at CMakeLists.txt:209 (message): CUDA NOT found: use -DCUDA_ENABLE=OFF to build without NVIDIA GPU support
-- Configuring incomplete, errors occurred!
See also "/usr/local/src/xmr-stak/CMakeFiles/CMakeOutput.log".`

我试过:

sudo cmake  

再次,出现了一个稍微不同的错误:

-- Set miner currency to 'monero' and 'aeon'
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing:  CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
CMake Error at CMakeLists.txt:209 (message):
  CUDA NOT found: use -DCUDA_ENABLE=OFF to build without NVIDIA GPU support`
-- Configuring incomplete, errors occurred!
See also "/usr/local/src/xmr-stak/CMakeFiles/CMakeOutput.log".

我尝试从Nvidia 网站出现以下错误:

-> 运行文件[本地]

$ sudo sh cuda_9.1.85_387.26_linux.run
[sudo] password for username: 
sh: 0: Can't open cuda_9.1.85_387.26_linux.run

-> deb[本地]

$ sudo dpkg -i cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb
dpkg: Error while processing the archive cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb (--install):    
The archive can not be accessed: file or directory not found    
Errors occurred while processing:    
cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb  

答案1

sh: 0: 无法打开 cuda_9.1.85_387.26_linux.run

因为奇怪的是,nVidia 网站上的下载不包含扩展.run。尝试用​​以下命令替换该命令:

$ sudo sh cuda_9.1.85_387.26_linux

或重命名文件以包含 .run 扩展名。

答案2

在你问题结尾的两种情况下,-> 运行文件[本地]-> deb[本地],您收到的错误是出于同样的原因,您没有提供 cuda_9.1.85_387.26_linux.run 或 cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb 的完整路径。要显示文件的完整路径,请将文件的图标从文件管理器拖到终端中。或者,您可以cd在运行这两个命令之一之前使用 将目录更改为包含该文件的目录。例如,如果文件位于您的下载目录中,则将目录更改为文件父目录的命令是:cd ~/Downloads

相关内容