OpenCV on Ubuntu 17.04

I had OpenCV installed on my Ubuntu machine with Ubuntu 16.10 . I recently upgraded to the latest Ubuntu 17.04 and OpenCV that did not work.

I get the following error.

 ImportError: libjasper.so.1: cannot open shared object file: No such file or directory 

I tried installing libjasper . Using the sudo apt-get install libjasper-dev

But I get the error E: Unable to locate package libjasper-dev

How can i fix this?

+16
python ubuntu opencv
source share
5 answers

I found the answer here: https://github.com/opencv/opencv/issues/8622

 sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main" sudo apt update sudo apt install libjasper1 libjasper-dev 

Links to packages 17.04 no longer work.

+29
source share

libjasper-dev is not available for Ubuntu 17.04.

So, you need to install the package from an earlier version. Try the following:

 echo "deb http://us.archive.ubuntu.com/ubuntu/ yakkety universe" | sudo tee -a /etc/apt/sources.list 

This will add a new line to the sources.list file in / etc / apt. This will install packages from 16.10.

Now you can install the missing libjasper-dev package with the following commands:

 sudo apt-get update sudo apt-get install libjasper-dev 
+11
source share

Installing the opencv library from the repository worked for me. Only both of the following commands.

 sudo apt-get install opencv-data sudo apt-get install libopencv-dev 

After installing that it worked as before. I used to build opencv myself. One of the repositories will work with a guarantee.

+9
source share

I had to download a new and updated, built-in version of opencv and success

0
source share

Write it down, it’s really useful,

 echo "deb http://us.archive.ubuntu.com/ubuntu/ yakkety universe" | sudo tee -a /etc/apt/sources.list 
0
source share

All Articles