I was recently shown a method to install a precompiled version of OpenCV from the following link: Install Precompiled OpenCV 4.8 on Raspberry Pi

When I run the command sudo apt install -y ./opencv_64.deb I'm met with

Note, selecting 'opencv:arm64' instead of './opencv_64.deb Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies:opencv:arm64 : Depends: libgstreamer1.0-0:arm64 (>= 1.18.4) but it is not installable
            Depends: libgstreamer-plugins-base1.0-0:arm64 (>= 1.18.4) but it is not installable
            Depends: libavcodec58:arm64 (>= 4.3.2)
            Depends: libavformat58:arm64 (>= 4.3.2) but it is not going to be installed
            Depends: libavutil56:arm64 (>= 4.3.2) but it is not going to be installed
            Depends: libswscale5:arm64 (>= 4.3.2) but it is not going to be installed
            Depends: python3-numpy:arm64 (>= 1.19.5) but it is not installable  
E: Unable to correct problems, you have held broken packages.

Does anyone know how to fix, I'm new to Pi and OpenCV so any help is massive appreciated.

  • You haven't mentioned Bullseye or Bookworm. Commented Oct 17, 2023 at 13:30
  • That is an essential question @toyotaSupra, because the install link say: Binaries are compatible with Raspberry Pi OS Bullseye (32-bit and 64-bit).
    – MatsK
    Commented Oct 28, 2023 at 17:53

2 Answers 2


There is already a precompiled version in the repository (admittedly v4.6).

Run sudo apt install python3-opencv

As an aside I am not sure that you can use apt to install local deb - I always use dpkg, but there is no point in this case.

Unless you have a very good reason for installing a later version than provided by Debian stick with the package version.


It's because you're on Bullseye (Debian 11) while the article and code there is for Bookworm (12)

The simplest solution would be to upgrade to bookworm. And python3-opencv can be installed with apt from distro repositories, in bookworm it will be newer (4.8?) than in yours bullseye, and probably enough for you. But if you need 4.9 then follow the article.

In bullseye python3-opencv installs opencv 4.2 version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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