2

I made a simple application with OpenCV for the RPI2.

To do so, I installed the 'development' package on my RPI2.

sudo apt-get install libopencv-dev python-opencv

Now, I want to install my application on other RPI2. My RPI2 are running Raspbian.

Do I have to install the full "development" package on my others RPI2 ? Is there an OpenCV package with only the "release" library ?

I tried this package (libopencv) but it does not seems to exists.

sudo apt-get install libopencv
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libopencv

What would be the standard way to install only Opencv 'release' library on the RPI2 ?

1

Do I have to install the full "development" package on my others RPI2 ? Is there an OpenCV package with only the "release" library ?

-dev packages aren't different versions, they're paired with the main library. If you look, they are comparatively tiny, and if you try to install them without the main library, they will require it as a dependency.

What they mostly are is this:

// Compile -lfoobar
#include <foobar.h>
          ^^^^^^^^

The header files. If you want to compile from source, you need those. However, if you have a pre-compiled binary that links to libfoobar, you don't need the header, you just need libfoobar.

Hence, distro packages that require libfoobar don't require libfoobar-dev. Whether or not you need the -dev to install your app depends on whether you intend to build it again on the other machine, or use the one you've compiled already. Since these are both Pi 2's, you are free to do the latter and won't need the -dev package. Either way, you do need the library itself.

  • OK, but the package "libopencv" does not seems to exists. Is there a OpenCV package for RPI2 which is not meant for development. (-dev) ? – ssinfod Oct 21 '15 at 17:44
  • 1
    It looks like it's broken into parts, and that -dev package will include as a dependency a number of those parts and their corresponding individual -dev packages; you can read the list here, where it is described as a "meta" package (the actual headers are in its dependencies). You can contemplate that if you know what you need, but I'd just install the whole thing. It certainly won't do any harm. – goldilocks Oct 21 '15 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.