gocv
gocv copied to clipboard
Error installing OpenCV libtbb2 and libdc1394-22-dev not found
Error installing OpenCV
Description
I had a problem installing OpenCV in Docker using the golang:1.21 image, some libs were not found:
DEBS=unzip wget build-essential cmake curl git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libtbb2
libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
libtbb2
and libdc1394-22-dev
They were unable to be installed, so I replaced these packages and managed to successfully build OpenCV
Original package | New package |
---|---|
libtbb2 | libtbbmalloc2 |
libdc1394-22-dev | libdc1394-dev |
I applied these changes to the OpenCV installation step in Docker.
# Install OpenCV
RUN git clone https://github.com/hybridgroup/gocv.git && \
cd gocv && \
awk '{gsub(/libtbb2/, "libtbbmalloc2"); gsub(/libdc1394-22-dev/, "libdc1394-dev"); print}' Makefile > Makefile.tmp && \
mv Makefile.tmp Makefile && \
make install && \
cd .. && \
rm -rf gocv
Steps to Reproduce
- git clone https://github.com/hybridgroup/gocv.git
- cd gocv
- make install
Your Environment
- Operating System and version: Mac OS M1 Pro
- OpenCV version used: 4.8.1
- How did you install OpenCV? From gocv
- GoCV version used: 0.35.0
- Go version: 1.21
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
? No
Note that the dev
branch has these changes applied.
https://github.com/hybridgroup/gocv/blob/1ce30bf65f8ede198102241f5103e9af2e89bcf6/Makefile#L22