08-28-2020, 02:17 AM
Hello, I have just started using Tinker Edge-R board.
condition
OS: Tinker Edge R Debian Stretch V1.0.4
OpenCV version: 3.4.11
Pyrhon3.5.3
When I run a simple python code, I always get a below error message.
Python 3.5.3 (default, Jul 9 2020, 13:00:10)
[GCC 6.3.0 20170516] on linux
Type "copyright", "credits" or "license()" for more information.
>>> import cv2
>>> cv2.__version__
'3.4.11'
>>>
=============== RESTART: /home/linaro/Python_Scripts/circle.py ===============
Traceback (most recent call last):
File "/home/linaro/Python_Scripts/circle.py", line 17, in <module>
cv2.imshow('img1',img)
cv2.error: OpenCV(3.4.11) /home/linaro/Downloads/opencv-3.4.11/modules/highgui/src/window.cpp:658: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
-----------------------------------------------------------------------------------------
It seems Python code of opencv works except cv2.imshow() command even if above condition.
IF I comment out cv2.imshow('img1',img) -> #cv2.imshow('img1',img), no error has been caused.
waitKey(0) and destroyAllWindow() cause an error, too.
Would you support to solve this issue ?
Then I tried to install the libgtk2.0-dev and pkg-config.
But I have an error about libgtk2.0-dev installation like a following.(pkg-config should be OK.)
Thank you for your strong support in advance.
--------------------------------------------------------------------------------------------------------------------------
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$ sudo apt-get install libgtk2.0-dev
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:
libgtk2.0-dev : Depends: libxinerama-dev (>= 1:1.0.1-4.1) but it is not going to be installed
Depends: libxrandr-dev (>= 2:1.2.99) but it is not going to be installed
Depends: libxcomposite-dev (>= 1:0.2.0-3) but it is not going to be installed
Depends: libxdamage-dev (>= 1:1.0.1-3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Next try ->
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$ sudo apt-get install libgtk2.0-dev \
> libxinerama-dev libxrandr-dev libxcomposite-dev libxdamage-dev
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:
libxcomposite-dev : Depends: x11proto-composite-dev (>= 1:0.4)
libxdamage-dev : Depends: x11proto-damage-dev (>= 1.1)
libxinerama-dev : Depends: x11proto-xinerama-dev (>= 1.2)
libxrandr-dev : Depends: x11proto-randr-dev (>= 1.4)
E: Unable to correct problems, you have held broken packages.
Next next try ->
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$ sudo apt-get install libgtk2.0-dev libxinerama-dev libxrandr-dev libxcomposite-dev libxdamage-dev \
> x11proto-composite-dev x11proto-damage-dev x11proto-xinerama-dev x11proto-randr-dev
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:
libgtk2.0-dev : Depends: libxi-dev (>= 1:1.0.1-4) but it is not going to be installed
x11proto-dev : Breaks: x11proto-composite-dev (< 1:2018.3)
Breaks: x11proto-damage-dev (< 1:2018.3)
Breaks: x11proto-randr-dev (< 2018.3)
Breaks: x11proto-xinerama-dev (< 2018.3)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$
condition
OS: Tinker Edge R Debian Stretch V1.0.4
OpenCV version: 3.4.11
Pyrhon3.5.3
When I run a simple python code, I always get a below error message.
Python 3.5.3 (default, Jul 9 2020, 13:00:10)
[GCC 6.3.0 20170516] on linux
Type "copyright", "credits" or "license()" for more information.
>>> import cv2
>>> cv2.__version__
'3.4.11'
>>>
=============== RESTART: /home/linaro/Python_Scripts/circle.py ===============
Traceback (most recent call last):
File "/home/linaro/Python_Scripts/circle.py", line 17, in <module>
cv2.imshow('img1',img)
cv2.error: OpenCV(3.4.11) /home/linaro/Downloads/opencv-3.4.11/modules/highgui/src/window.cpp:658: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
-----------------------------------------------------------------------------------------
It seems Python code of opencv works except cv2.imshow() command even if above condition.
IF I comment out cv2.imshow('img1',img) -> #cv2.imshow('img1',img), no error has been caused.
waitKey(0) and destroyAllWindow() cause an error, too.
Would you support to solve this issue ?
Then I tried to install the libgtk2.0-dev and pkg-config.
But I have an error about libgtk2.0-dev installation like a following.(pkg-config should be OK.)
Thank you for your strong support in advance.
--------------------------------------------------------------------------------------------------------------------------
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$ sudo apt-get install libgtk2.0-dev
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:
libgtk2.0-dev : Depends: libxinerama-dev (>= 1:1.0.1-4.1) but it is not going to be installed
Depends: libxrandr-dev (>= 2:1.2.99) but it is not going to be installed
Depends: libxcomposite-dev (>= 1:0.2.0-3) but it is not going to be installed
Depends: libxdamage-dev (>= 1:1.0.1-3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Next try ->
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$ sudo apt-get install libgtk2.0-dev \
> libxinerama-dev libxrandr-dev libxcomposite-dev libxdamage-dev
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:
libxcomposite-dev : Depends: x11proto-composite-dev (>= 1:0.4)
libxdamage-dev : Depends: x11proto-damage-dev (>= 1.1)
libxinerama-dev : Depends: x11proto-xinerama-dev (>= 1.2)
libxrandr-dev : Depends: x11proto-randr-dev (>= 1.4)
E: Unable to correct problems, you have held broken packages.
Next next try ->
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$ sudo apt-get install libgtk2.0-dev libxinerama-dev libxrandr-dev libxcomposite-dev libxdamage-dev \
> x11proto-composite-dev x11proto-damage-dev x11proto-xinerama-dev x11proto-randr-dev
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:
libgtk2.0-dev : Depends: libxi-dev (>= 1:1.0.1-4) but it is not going to be installed
x11proto-dev : Breaks: x11proto-composite-dev (< 1:2018.3)
Breaks: x11proto-damage-dev (< 1:2018.3)
Breaks: x11proto-randr-dev (< 2018.3)
Breaks: x11proto-xinerama-dev (< 2018.3)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
linaro@linaro-alip:~/Downloads/opencv-3.4.11/build$



![[-]](https://tinkerboarding.co.uk/forum/images/collapse.png)