随手记3

来源:互联网 发布:南开大学网络教育专业 编辑:程序博客网 时间:2024/06/06 07:30

安装g++之后,进入/NVDIA_GPU_Computing_SDK/C文件夹:

sudo make

发现报错,还要继续安装

参考下文:http://forums.nvidia.com/index.php?showtopic=171590

具体过程:

The CUDA group(This isn't necessary, but it's a good way to handle directly modifying the files in /usr/local/cuda.)

$ groupadd cuda

$ gpasswd -a <user> cuda

$ chgrp -R cuda /usr/local/cuda

$ chmod -R 775 /usr/local/cuda

where <user> is your non-root user account.(写用户名,不加尖括号)。

The .bashrc file(随手记2中修改的是/etc/profile,同理修改):

There are a few variables needed for everything to go smoothly. These can be exported to the session (using export, but I prefer to make them permanent). Using <insert your favorite text editor here>, add the following lines to the end of the file ~/.bashrc

export PATH="/usr/local/cuda/bin:$PATH"

export LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH"

export CPLUS_INCLUDE_PATH="/usr/local/cuda/include"

export LIBRARY_PATH="/usr/lib/nvidia-current"

随手记2中已加前两行,此处加上后两行就好了。

(此处黄色高亮的部分不需要修改,依照随手记2中加上前两行就足够了,在随手记5中提到rollback此处,否则报错,费时费力,后悔。。。)

A few extra packages(安装一些很麻烦的包,sudo apt-get install ***,耐心挨个装):

I installing found these packages were necessary to compile, however you may already have some/all of them installed.

(Fixes "cannot find -lXi" error):

libxext-dev

libxi-dev

x11proto-xext-dev

(Fixes "cannot find -lXmu" error):

libice-dev

libsm-dev

libxt-dev

libxmu-headers

libxmu-dev

(Fixes "cannot find -lglut" error):

freeglut3-dev

libglut3-dev

再试一下sudo make,还是不行,报错:

/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status

费解了,还要继续装:

原创粉丝点击