Open soypat opened 3 years ago
First of all, you HAVE to have the correct version of OpenCV installed that matches the version of GoCV you want to use. Since OpenCV's own interfaces change as they have new releases, any given version of GoCV is only intended to work with that specific version of OpenCV.
The messages you mention are always due to not having OpenCV correctly installed, or else not having the matching version.
If you git clone
the repo, and then cd to that dir, the make
tasks should build, as well as test and cleanup the OpenCV install. If you did not get that to work yet, nothing else will work after that point.
Thanks for the reply. I'm trying your suggestion to no avail (cloning repo+make install
) due to getting same errors.
Pastebin link to result of make install
: here
You have several errors appearing in your output:
Err:16 https://apt.llvm.org/focal llvm-toolchain-buster-11 Release
404 Not Found [IP: 2a04:4e42:4d::561 443]
Reading package lists... Done
E: The repository 'http://apt.llvm.org/focal llvm-toolchain-buster-11 Release' does not have a Release file.
then
[opencv.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of opencv.zip or
opencv.zip.zip, and cannot find opencv.zip.ZIP, period.
the next failure would be expected since you did not appear to have successfully downloaded/unzipped the opencv compressed file with the source fies:
/bin/sh: 1: cd: can't cd to /tmp/opencv/opencv-4.5.2
I have installed personally with this makefile on both Ubuntu 16.04 and 18.04 but probably have not on Ubuntu 20.04. Not sure if that is at all related.
Description
Attempting to run a program that uses gocv (even older versuions) results in errors of undefined types
Steps to Reproduce
I run
go clean -modcache
andgo clean -cache
beforehand:gocv
as detailed in repo:go get -u -d gocv.io/x/gocv
cd /home/pato/go/pkg/mod/gocv.io/x/gocv
->make install
Errors when running make install
Running other projects such as https://github.com/milosgajdos/go-estimate-examples/tree/master/bfdynamics which uses gocv.io/x/gocv v0.19.0 yields:
Your Environment
hostnamectl