树莓派4B Ubuntu18.04安装OpenCv依赖包libjasper-dev出现unable to locate libjasper-dev的解决办法

树莓派4B Ubuntu18.04下安装OpenCv依赖包libjasper-dev出现unable to locate libjasper-dev的解决办法

sudo apt-get install libjaster-dev

提示:errorE: unable to locate libjasper-dev

网上查看,大佬们都是这么解决的
sudo add-apt-repository “deb http://security.ubuntu.com/ubuntu xenial-security main”
sudo apt update
sudo apt install libjasper1 libjasper-dev

按照以上到执行 sudo apt update 然后就报错,找不到这 http://security.ubuntu.com/ubuntu xenial-security main 地方,无法访问
试过很多种办法,但是都不行
最后集结众多大佬的经验,我猜测是因为树莓派是ARM架构,不支持以上的源,然后把它改成以下这样

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main

如果不懂,直接复制我的源

sudo gedit /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main

再重新更新源

sudo apt update

更新完源

sudo apt-get install libjaster-dev

然后直接起飞!
本文借鉴众多大佬的经验,在这里感谢各位大佬,所以就不一一贴链接了。

**

你可能感兴趣的:(树莓派4B,opencv,ubuntu,opencv,ubuntu,arm)