ubuntu爬坑

在Ubuntu中,有时候运用sudo apt-get install 安装软件时,会出现一下的情况
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
解决方案:
找出并且杀掉所有的apt-get和apt进程:

ps -A|grep apt
sudo kill -9

删除锁定文件:

sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock

强制重新配置软件包:

sudo dpkg --configure -a

更新软件包源列表

sudo apt update
  1. gcc,g++重新安装
    移除之前gcc,g++
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++

安装:

sudo apt-get install gcc-4.9
sudo apt-get install g++-4.9

将gcc和g++绑定到新安装的版本上:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20

3.安装GPU显卡驱动后运行nvidia-smi 会报错:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
此时需要进bios关闭安全启动项:具体操作见下
https://blog.csdn.net/qq_29650553/article/details/81028739
4.安装cuda9.0时可能出现错误:
unsupported compiler x.x.x Use --override to override this check错误类型
解决方案:./cuda_9.0.176_384.81_linux.run --override
5.Ubuntu Teamviewer 安装
官网下载安装包:
https://www.teamviewer.com/zhcn/download/linux/
安装deb软件包:

sudo dpkg -i teamviewer_12.0.76279_i386.deb

(下面这个命令是修复依赖关系(depends)的命令,就是假如你的系统上有某个package不满足依赖条件,这个命令就会自动修复,安装那个package依赖的package)安装出现错误时执行

sudo apt-get install -f

6.u盘挂载:

sudo df -h
mkdir /mnt/sdsdsd
sudo mount /dev/sdc1 /mnt/sdsdsd/

其他问题:

sudo ntfsfix /dev/sdc1

你可能感兴趣的:(深度学习)