dist-upgrade完黑屏解决办法:
sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub update-grub reboot
或者直接在Grub界面在linux….quiet后面加上nouveau.modeset=0,禁止开源驱动启用
安装nvidia驱动
下载驱动 http://www.geforce.cn/drivers
1. Add the Kali repositories to /etc/apt/sources.list
2. apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
3. reboot
4. cd ~/Downloads
5. Download the latest nvidia driver and cuda toolkit
wget http://us.download.nvidia.com/XFree8…_64-346.59.run
6. chmod +x NVIDIA-Linux-x86_64-346.59.run
7. Download the latest cuda toolkit
wget http://developer.download.nvidia.com…0.28_linux.run
8. chmod +x cuda_7.0.28_linux.run
9. Install Linux Headers for your current kernel
apt-get install linux-headers-$(uname -r)
10. Install the following
apt-get install freeglut3-dev libxmu-dev
11. CTRL+ALT+F1 to drop into a terminal shell
12. cd ~/Downloads
13. modprobe -r nouveau
14. /etc/init.d/gdm3 stop
15. Execute the following to install the Nvidia Drivers:
./NVIDIA-Linux-x86_64-346.59.run
NOTE: Do NOT run the nvidia-xconfig
16. reboot
17. Open Terminal and cd ~/Downloads
安装CUDA:
下载最新版cuda程序,https://developer.nvidia.com/cuda-downloads
安装cuda会遇到三个问题:
1.编译器版本不对,解决方法:–override compiler
2.缺库文件,解决方法:apt-get把库文件补齐,然后把相应库文件软链到/usr/lib/,不然cuda找不到
3.报Can’t locate InstallUtils.pm in @INC,解决方案如下:
解压下回来的cuda run文件然后手动放置InstallUtils.pm:
sh cuda* –noexec –target cuda
copy InstallUtils.pm to /usr/lib/x86_64-linux-gnu/perl-base
export $PERL5LIB
完事儿后开始安装cuda
cuda_* –override compiler
nano /etc/ld.so.conf
Add the following line to the end of the file:
/usr/local/cuda-7.0/lib64
20. Execute the following to apply our changes:
ldconfig
21. Build the NVIDIA samples so we can confirm CUDA is working
cd /root/NVIDIA_CUDA-7.0_Samples/
make
NOTE: This step takes quite a bit of time to complete.
22. cd 1_Utilities/deviceQuery
23. Execute the following to test:
./deviceQuery
引用资源:
http://forums.kali.org/showthread.php?25064-Kali-Linux-1-1-0-kernel-install-Nvidia-proprietary-drivers-for-GTX-970-and-oclHashcat
https://devtalk.nvidia.com/default/topic/983777/cuda-setup-and-installation/can-t-locate-installutils-pm-in-inc/
How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux