最近在ubuntu上编译opencv4.5.5,无法安装libjasper-dev,解决的方法就是添加源镜像地址。
第一步:打开添加源的文档。
sudo gedit /etc/apt/sources.list
第二步:注释已有的源,在文档末尾添加清华镜像。
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
第三步:更新源
sudo apt-get update
sudo apt-get upgrade
第四步:重新安装
sudo apt-get install libjasper-dev