7

Following this tutorial, I am trying to install the OpenCV 3 with Python on Ubuntu 16.04.

At the step of entering $ sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev

I got this message:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libtiff4-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libtiff5-dev:i386 libtiff5-dev

E: Package 'libtiff4-dev' has no installation candidate

Is this because I am using the latest LTS release of Ubuntu (the author used Ubuntu 14.04)? Is it okay if I just install the libtiff5-dev one (I mean, will it effect the OpenCV operation that I will be building from now on)?

  • 1
    I had the same issue on Ubuntu 15.10, So, it is not because of using latest LTS release (Ubuntu 16.04). [libtiff4-dev](http://packages.ubuntu.com/trusty/libtiff4-dev) package is available from libtiff5-dev. So, I think it is okay to install libtiff5-dev. – Ajeet Shah May 19 '16 at 07:24
  • Tried it. It works good so far. Thanks. – Hafiz Hilman Mohammad Sofian May 22 '16 at 01:05

1 Answers1

12

I had the same issue on Ubuntu 15.10, So, it is not because of using latest LTS release (Ubuntu 16.04).

OpenCV requires libtiff-dev package to support TIFF images and libtiff5-dev is currently the latest available package.

So, I think it is best to install libtiff5-dev:

sudo apt-get install libtiff5-dev (for 64 bit system)

sudo apt-get install libtiff5-dev:i386 (for 32 bit system)

Ajeet Shah
  • 18,551
  • 8
  • 57
  • 87
  • What about the "libjasper-dev". It seems to be the same problem, but in this one, it does not appear any candidates for substitute it – brunoramonalmeida Aug 25 '17 at 15:22
  • @brunoramonalmeida What is your ubuntu version? And how are you trying to install [`libjasper-dev`](https://packages.ubuntu.com/xenial/libjasper-dev)? – Ajeet Shah Sep 01 '17 at 06:03
  • I use Kubuntu 17.10 – brunoramonalmeida Sep 07 '17 at 18:33
  • @brunoramonalmeida Read the [instructions](https://packages.debian.org/sid/arm64/libjasper-dev/download) to manually install it because the package (`libjasper-dev`) you are looking for seems to be not ready for 17.10 (but ready for 16.04). Check [this (17.10)](https://packages.ubuntu.com/zesty/libdevel/) and [this (16.04)](https://packages.ubuntu.com/xenial/libdevel/). – Ajeet Shah Sep 08 '17 at 08:57