用 windows 远程控制 Ubuntu 电脑:
用网上的一些教程去安装teamviewer (我下载的是teamviewer_15.35.7_amd64.deb)
#命令进行安装
sudo dpkg -i teamviewer_15.35.7_amd64.deb
#安装报错,修复依赖项
sudo apt-get install -f
但是依旧安装失败,并报错:
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
说明证书验证失败,因此用了下面一系列方法,还是失败:
#方法一
export GIT_SSL_NO_VERIFY=1
#方法二
sudo update-ca-certificates
#方法三
git config --global http.sslverify false
在看了报错的具体内容,发现有一些源的内容,于是怀疑是不是Ubuntu 用的国内源有问题了,就打算更换国内源:
1 先备份好之前的源文件
sudo cp /etc/apt/sources.list sources_backup.list
然后用下面命令查看sources_backup.list文件已经备份好
ls -l
2 修改 /etc/apt/sources.list 源文件
#打开源文件,并修改
sudo gedit /etc/apt/sources.list
提供两个国内源,可直接将原内容删除并复制进去(因为已经提前备份好了)
#阿里云源
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe
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
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
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
#清华大学源
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
3 最后更新即可
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
等更新完成后重新安装就成功了:
sudo dpkg -i teamviewer_15.35.7_amd64.deb