CUDA 7.0抱怨不支持gcc 4.9

时间:2016-04-29 23:45:08

标签: c++ linux gcc cuda compatibility

我安装了gcc-4.7,gcc-4.8,gcc-4.9

当我尝试做的时候:

luarocks install cutorch

我收到错误:

In file included from /usr/include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
 #error -- unsupported GNU version! gcc 4.9 and up are not supported!

我找到了similar problem

但是当我尝试运行命令时:

nvcc --compiler-bindir /usr/bin/gcc-4.7

我收到错误:

nvcc fatal: No input files specified; use option --help for more information

我是新的并且在前一天安装​​了linux。请帮帮我

1 个答案:

答案 0 :(得分:2)

在安装之前运行以下命令:

export CXX=/usr/bin/g++-4.8
export CC=/usr/bin/gcc-4.8

这应该将编译器设置为gcc-4.8进行编译。