我是靠谱客的博主 听话蜜蜂,最近开发中收集的这篇文章主要介绍链接库设置_Ubuntu下conda权限问题以及cuda动态链接库问题,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

问题1:Anaconda的使用权限

$ conda update conda
Solving environment: failed
NotWritableError: The current user does not have write permissions to a required path.
path: /path/to/custom/dir/pkgs/urls.txt
uid: 1000
gid: 1000

使用如下命令:sudo chown -R user anaconda3

问题2:cuda动态链接库设置

在使用cuda时,出现如下错误:

ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

I have find the reason is ldconf, ldconfig is a dynamic link library management command whose purpose is to allow the dynamic link library to be usedby the system.

The default ldconf only search /lib and /usr/lib, as well as the library file under the directory listed in the configuration file /etc/ld. so. conf.

so all of this is caused by the dynamic library of CUDA in the installed CUDA path such as : /path/cuda-9.0/lib64 or /path/cuda-9.0/lib. (for example my CUDA is installed in /usr/local/cuda-9.0)

1.if you install the CUDA manual, then after install, you should add the path of cuda/lib64 to /etc/ld.so.conf filesudo echo "/usr/local/cuda-9.0/lib64/" >> /etc/ld.so.conf
thensudo ldconfig
of course , you can add the path manual, like:vim /etc/ld.so.conf
then add the path '/usr/local/cuda-9.0' at the end.
then update itsudo ldconfig
after the operation, reopen the ipython or pycharm ,import tensorflow as tf
wow, you will enjoy it!

if you install the CUDA by command such as 'dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb' or others, it may add the cuda lib path to the /etc/ld.so.conf automatically . but to be on the safe side, check the /etc/ld.so.conf and see if the path add to it .

最后

以上就是听话蜜蜂为你收集整理的链接库设置_Ubuntu下conda权限问题以及cuda动态链接库问题的全部内容,希望文章能够帮你解决链接库设置_Ubuntu下conda权限问题以及cuda动态链接库问题所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部