Ubuntu20.04安装opencv
一.Ubuntu换国内源
Xubunut、Kubuntu都是ubuntu发行版,只是桌面环境不同,换源也是一样。
1.sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 备份原来的sorce文件
2.sudo gedit /etc/apt/sources.list 修改sources.list文件
gedit是ubuntu自带的图像界面编辑器,xubuntu、kubuntu自带的不是gedit,Kubuntu自带kate。你也可以用vi/vim去编辑。
sudo vim /etc/apt/sources.list
1.添加阿里、中科大镜像源
中科大镜像源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted