码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu安装显卡驱动和cuda

时间:2018-05-19 13:01:07      阅读:452      评论:0      收藏:0      [点我收藏+]

标签:显卡驱动   应该   pac   dev   enc   ted   vcc   linu   动态链接库   

NVIDIA-linux.run安装后,会出现登录页面循环,解决办法是在运行命令后加入-no-opengl-files

打开nvidia x server Settings软件,显示:You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.
运行sudo nvidia-xconfig,重启后,导致屏幕分辨率变为688×688.恢复方法为删去/etc/X11/xorg.conf文件。

更新grub:为防止系统自动修改此文件,打开文件 /etc/default/grub, 在 GRUB_CMDLINE_LINUX_DEFAULT 中增加选项 "nogpumanager",之后更新 grub 即可,
http://www.cnblogs.com/gaowengang/p/6068788.html

 

$:/etc/X11$ sudo nvidia-xconfig

WARNING: Unable to locate/open X configuration file.

Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc‘
to the PKG_CONFIG_PATH environment variable
No package ‘xorg-server‘ found
New X configuration file written to ‘/etc/X11/xorg.conf‘


最后,这个问题放弃解决,中间修改了/ect/module文件,里面为空,后面改过来了,没什么用,之所以改,是看的ubuntu官网上的nvidia-manual.

安装cudnn 7.0,安装openblas.

opencv是通过apt-get在前置条件中安装的,通过apt-get install下载的文件位置在/var/cache/apt/archives下。opencv相关的头文件在/usr/include目录下,动态链接库文件和静态库文件在/usr/lib/x86_64linux_gnu下。
http://blog.csdn.net/tina_ttl/article/details/52745807


使用pip安装一些依赖库遇到问题,报Python PIP Install throws TypeError: unsupported operand type(s) for -=: ‘Retry‘ and ‘int‘这样的错误。
解决方法:http://www.itwendao.com/article/detail/186752.html
上面的链接是一系列ubantu问题的解决方法。
apt-get remove python-pip python3-pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
python3 get-pip.py
结果是下载了pip9.0.1,原始版本为8.0.1。
经过一下午尝试,并且以为是网线的问题,换了网线后,没用。
最终方法:sudo pip install.
python各安装包所在路径:/usr/local/lib/python2.7/dist-packages

遇到的错误:
1.有一些依赖没安装,比如glog,lmdb,。hdf5由于安装的是hdf5-serial-dev,所以在Makefile.config头文件库路径需要加入/usr/include/hdf5/serial.。
2.nvcc fatal : Unsupported gpu architecture ‘compute_20‘
Makefile:594: recipe for target ‘.build_release/cuda/src/caffe/util/math_functions.o‘ failed
在Makefile.config里修改CUDA_ARCH ,将其中的‘compute_20‘的两项注释掉。

3.错误:/usr/bin/ld: 找不到 -lhdf5_hl
/usr/bin/ld: 找不到 -lhdf5
解决办法: locate libhdf5_hl,查找库的位置,修改LIBRARY_DIRS,增加该库所在的路径。

pycaffe:pythonpath配置:sudo gedit /etc/profile, export PYTHONPATH=~/Documents/caffe-master/python:$PYTHONPATH
在~/.bashrc中配置应该也行。

ubuntu安装显卡驱动和cuda

标签:显卡驱动   应该   pac   dev   enc   ted   vcc   linu   动态链接库   

原文地址:https://www.cnblogs.com/benbencoding798/p/9059935.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!