Ubuntu下CUDA8.0安装错误之InstallUtils.pm

问题:Ubuntu18.04安装官网的CUDA8.0runfile文件出错

打开报错内容中写明的log文件后发现以下提示:

Can't locate InstallUtils.pm in @INC (you may need to install the InstalUtils module) (找不到InstallUtils.pm)

 

解决方法:

log文件中,给出了几个目录的位置,并且说明在这些目录都无法找到InstallUtils.pm(can't locate InstalUtils.pm)

选取多个目录中的一个,先记录下来。

我选取的一个是目录是 /usr/lib/x86_64-linux-gnu/perl5/5.26

打开终端,进入放着cuda 8.0 runfile安装文件的路径下面,即 cuda_8.0.61_375.26_linux.run 的路径下。

做以下操作:

1)解压runfile文件

sh cuda_8.0.61_375.26_linux.run --noexec --target 001 #将runfile文件解压并且放到001文件夹中(001可自动创建

2)进入解压后的文件夹,将InstallUtils.pm拷贝到之前我们从log中记录的文件目录下,注意可能使用sudo以获得管理员权限

sudo cp InstalUtil.pm *****                  //拷贝复制,*****指目标目录

3)输入export $PERL5LIB

export $PERL5LIB

再次尝试运行cuda 8.0 的runfile文件,安装成功!

posted @ 2019-01-26 16:15  Leozi  阅读(196)  评论(0编辑  收藏  举报