1 Permission denied
報錯:
-bash: ./compile.sh: Permission denied
沒有操作權(quán)限,改為賦予最高權(quán)限(777):
chmod 777 compile.sh
2 cuda 問題
報錯:
unable to execute '/usr/local/cuda-9.0/bin/nvcc': No such file or directory
error: command '/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1
找不到cuda下nvcc文件,需要找到自己的nvcc文件所在地,然后輸入:
./compile.sh \\ --export CUDA_HOME=/usr/local/cuda-8.0/bin
如果還不行,需要查看一下是否有nvcc:
nvcc --version
2.1 nvcc正常
若nvcc正常,設(shè)置cuda路徑首先執(zhí)行:
sudo vim ~/.bashrc
設(shè)置為:
export PATH=/usr/local/cuda-9.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
然后執(zhí)行:
sudo vim /etc/profile
末尾添加:
export CUDA_HOME=/usr/local/cuda-9.0
export PATH=/MATLAB/R2016b/bin:/usr/local/cuda-9.0/bin:/anaconda3/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
然后執(zhí)行
source /etc/profile
使鏈接生效
2.2 command not found
報錯:
-bash: nvcc: command not found
應(yīng)該安裝nvcc:
sudo apt-get install nvidia-cuda-toolkit
報錯:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
升級apt-get update:
sudo apt-get update
報錯:
Failed to connect to nvidia.github.io port 443: Connection timed out
2.2.1 修改源
則應(yīng)該修改源:
(1)修改前先做備份:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
(2)打開sources.list文件:
sudo vim /etc/apt/sources.list
替換為其他源:
清華源:
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
阿里源:
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
2.2.2 修改 nameserver
修改/etc/resolv.conf文件為:
nameserver 8.8.8.8
nameserver 4.2.2.2
nameserver 4.2.2.2
nameserver 4.2.2.2
3 not in the sudoers file
報錯:
××× is not in the sudoers file. This incident will be reported.
1.切換到超級用戶root:
su root
2.查看/etc/sudoers權(quán)限:
ls -all /etc/sudoers
可以看到當(dāng)前權(quán)限為744:
-r--r----- 1 root root 744 4月 16 20:36 /etc/sudoers
3.更改權(quán)限為777(表示允許操作):
chmod 777 /etc/sudoers
4.編輯/etc/sudoers:
vi /etc/sudoers
5.在root ALL=(ALL:ALL) ALL 下面添加一行:
XXX ALL=(ALL)ALL
其中XXX
表示當(dāng)前用戶名
6.把/etc/sudoers權(quán)限改回440:
chmod 440 /etc/sudoers
然后就可以切換回自己的用戶操作了
4 ASSERT
報錯:
ASSERT: "false" in file qasciikey.cpp, line 501
OpenCV版本不對,沒有里面沒有tracker。安裝contrib的OpenCV:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python
如果提示使用--user
:
pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python
5 no commands supplied
報錯:
no commands supplied
應(yīng)該將 python setup.py
改為 python setup.py install
。
6 FileNotFoundError
報錯:
[Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', /home/snowstorm/mmdetection']
磁盤空間已滿,清理空間。
審核編輯:湯梓紅
-
數(shù)據(jù)
+關(guān)注
關(guān)注
8文章
7073瀏覽量
89138 -
機(jī)器學(xué)習(xí)
+關(guān)注
關(guān)注
66文章
8423瀏覽量
132744 -
Shell
+關(guān)注
關(guān)注
1文章
366瀏覽量
23405
發(fā)布評論請先 登錄
相關(guān)推薦
評論