# Install python-opencv error: 'Unable to correct problems, you have held broken packages.'

**URL:** <https://forums.sifive.com/t/install-python-opencv-error-unable-to-correct-problems-you-have-held-broken-packages/3075>\
**Category:** HiFive Unleashed\
**Created:** [November 28, 2019, 6:55am UTC](https://forums.sifive.com/t/install-python-opencv-error-unable-to-correct-problems-you-have-held-broken-packages/3075 "2019-11-28T06:55:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TaLucGiaHoang](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TaLucGiaHoang](https://forums.sifive.com/u/TaLucGiaHoang)\
**Post date:** [November 28, 2019, 6:55am UTC](https://forums.sifive.com/t/install-python-opencv-error-unable-to-correct-problems-you-have-held-broken-packages/3075/1 "2019-11-28T06:55:10Z")

</div>

When I tried to install `opencv` and `python3-opencv` for my HiFive Unleashed Rev A00, I got this error

> root@buildroot:~# apt-get install libopencv-dev python3-opencv  
> Reading package lists… Done  
> Building dependency tree  
> Reading state information… Done  
> 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:  
> libopencv-dev : Depends: libopencv-contrib-dev (= 3.2.0+dfsg-6+riscv64.1) but it is not going to be installed  
> Depends: libopencv-viz-dev (= 3.2.0+dfsg-6+riscv64.1) but it is not going to be installed  
> Depends: libopencv3.2-java (= 3.2.0+dfsg-6+riscv64.1) but it is not going to be installed  
> Depends: libopencv-contrib3.2 but it is not going to be installed  
> python3-opencv : Depends: libopencv-viz3.2 (= 3.2.0+dfsg-6+riscv64.1) but it is not going to be installed  
> Depends: libopencv-contrib3.2 but it is not going to be installed  
> E: Unable to correct problems, you have held broken packages.

I also tried using

> apt-get auto-clean  
> apt-get autoremove  
> apt update  
> apt upgrade

as requested from [askubuntu.com](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages). But nothing happened.

---

<div class="post-metadata">

**Author:** ![bruce](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/bruce/32/452_2.png) [@bruce](https://forums.sifive.com/u/bruce)\
**Post date:** [November 28, 2019, 7:06am UTC](https://forums.sifive.com/t/install-python-opencv-error-unable-to-correct-problems-you-have-held-broken-packages/3075/2 "2019-11-28T07:06:04Z")

</div>

What image are you running? Why do you have apt-get commands available with a buildroot prompt?

---

<div class="post-metadata">

**Author:** ![TaLucGiaHoang](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TaLucGiaHoang](https://forums.sifive.com/u/TaLucGiaHoang)\
**Post date:** [November 28, 2019, 9:57am UTC](https://forums.sifive.com/t/install-python-opencv-error-unable-to-correct-problems-you-have-held-broken-packages/3075/3 "2019-11-28T09:57:32Z")

</div>

I am working base on this [tutorial](http://swhwc.jpn.org/?p=342).

---

<div class="post-metadata">

**Author:** ![TaLucGiaHoang](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TaLucGiaHoang](https://forums.sifive.com/u/TaLucGiaHoang)\
**Post date:** [December 10, 2019, 5:01am UTC](https://forums.sifive.com/t/install-python-opencv-error-unable-to-correct-problems-you-have-held-broken-packages/3075/4 "2019-12-10T05:01:38Z")

</div>

[SOLVED]  
I have downloaded and installed from source, include opencv and its dependencies
