Giter Site home page Giter Site logo

install-opencv's Introduction

Install-OpenCV

shell scripts to install different version of OpenCV in different distributions of Linux

Ubuntu

if your system is Ubuntu, run the commands below.

$ cd Ubuntu
$ chmod +x * 
$ ./opencv_latest.sh

RedHat

if your system is RedHat, run the commands below.

$ cd RedHat
$ chmod +x * 
$ ./opencv_latest.sh

ArchLinux

if your system is ArchLinux, run the commands below.

$ cd ArchLinux
$ chmod +x * 
$ ./opencv2_4_0.sh

install-opencv's People

Contributors

andi4000 avatar anew-bhav avatar arky avatar aseempatni avatar bearpaw avatar claudiopatricio avatar cogwirrel avatar dmitrysandalov avatar dubbelej avatar dwalkes avatar ishwarbhati avatar jamiemagee avatar jayrambhia avatar jorgepgjr avatar kaaloo avatar mkassner avatar ml0renz0 avatar piotrgiedziun avatar ralphtheninja avatar rishimukherjee avatar rorydungan avatar shadyvb avatar shinriyo avatar varhub avatar youyou3 avatar zhangxiansheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

install-opencv's Issues

minor update

Hi, your script is really useful.
What do you think of this quick update?

It is a typo, plus telling wget to avoid downloading the package if already there, and instead of 4 use only the available number of cores on the system.

diff --git a/Ubuntu/opencv_install.sh b/Ubuntu/opencv_install.sh
index ca04719..c4dd155 100755
--- a/Ubuntu/opencv_install.sh
+++ b/Ubuntu/opencv_install.sh
@@ -20,10 +20,10 @@ mkdir $dldir
cd $dldir
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get -qq remove ffmpeg x264 libx264-dev
-echo "Installing Dependenices"
+echo "Installing Dependencies"
sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-
echo "Downloading OpenCV" $version
-wget -O $downloadfile http://sourceforge.net/projects/opencvlibrary/files/open
+wget -c -O $downloadfile http://sourceforge.net/projects/opencvlibrary/files/o
echo "Installing OpenCV" $version
echo $downloadfile | grep ".zip"
if [ $? -eq 0 ]; then
@@ -35,7 +35,7 @@ cd opencv-$version
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_T
-make -j 4
+make -j cat /proc/cpuinfo | grep processor | wc -l
sudo make install
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
diff --git a/get_latest_version_download_file.sh b/get_latest_version_download_
old mode 100644
new mode 100755

Broken script.

dependencies.sh: 9: dependencies.sh: Syntax error: "}" unexpected

Unzip for Install-OpenCV / Ubuntu / 2.4 / opencv2_4_8.sh

Thanks so much for providing the OpenCV install scripts, saves a ton of time. I ran into one small issue running the Install-OpenCV / Ubuntu / 2.4 / opencv2_4_8.sh' script on a fresh headless Ubuntu VM. SInce unzip wasn't installed by default, the unzip step failed. I added the following line to script in the 'sudo apt-get -y install...' section.

sudo apt-get -y install unzip

opencv installation error

@jayrambhia , I get the below error when I try to install it on Ubuntu 16.04. Any ideas?

`-- General configuration for OpenCV 3.4.0 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Timestamp:                   2018-05-23T10:57:02Z
--     Host:                        Linux 4.4.0-119-generic x86_64
--     CMake:                       3.5.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2
--       SSE4_1 (3 files):          + SSSE3 SSE4_1
--       SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (2 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (9 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 5.4.0)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):
--     Linker flags (Debug):
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          dl m pthread rt /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libtbb.so cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda/lib64
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev dnn features2d flann highgui imgcodecs imgproc ml objdetect photo python2 python_bindings_generator shape stitching superres ts video videoio videostab
--     Disabled:                    js world
--     Disabled by dependency:      -
--     Unavailable:                 java python3 viz
--     Applications:                tests perf_tests examples apps
--     Documentation:               YES (/usr/bin/doxygen 1.8.11)
--     Non-free algorithms:         NO
-- 
--   GUI: 
--     QT:                          YES (ver 5.6.2)
--       QT OpenGL support:         YES (Qt5::OpenGL 5.6.2)
--     GTK+:                        NO
--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so)
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /home/paperspace/anaconda3/lib/libz.so (ver 1.2.11)
--     JPEG:                        /home/paperspace/anaconda3/lib/libjpeg.so (ver 90)
--     WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x0202)
--     PNG:                         /home/paperspace/anaconda3/lib/libpng.so (ver 1.6.34)
--     TIFF:                        /home/paperspace/anaconda3/lib/libtiff.so (ver 42 / 4.0.9)
--     JPEG 2000:                   /home/paperspace/anaconda3/lib/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.2.0)
-- 
--   Video I/O:
--     DC1394:                      YES (ver 2.2.4)
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 56.60.100)
--       avformat:                  YES (ver 56.40.101)
--       avutil:                    YES (ver 54.31.100)
--       swscale:                   YES (ver 3.1.101)
--       avresample:                YES (ver 2.1.0)
--     GStreamer:                   
--       base:                      YES (ver 1.8.3)
--       video:                     YES (ver 1.8.3)
--       app:                       YES (ver 1.8.3)
--       riff:                      YES (ver 1.8.3)
--       pbutils:                   YES (ver 1.8.3)
--     libv4l/libv4l2:              NO
--     v4l/v4l2:                    linux/videodev2.h
--     gPhoto2:                     YES
-- 
--   Parallel framework:            TBB (ver 4.4 interface 9002)
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Intel IPP:                   2017.0.3 [2017.0.3]
--            at:                   /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/build/3rdparty/ippicv/ippicv_lnx
--     Intel IPP IW:                sources (2017.0.3)
--               at:                /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/build/3rdparty/ippicv/ippiw_lnx
--     Lapack:                      YES (/home/paperspace/anaconda3/lib/libmkl_intel_lp64.so /home/paperspace/anaconda3/lib/libmkl_intel_thread.so /home/paperspace/anaconda3/lib/libmkl_core.so /home/paperspace/anaconda3/lib/libiomp5.so -lm)
--     Eigen:                       YES (ver 3.2.92)
--     Custom HAL:                  NO
-- 
--   NVIDIA CUDA:                   YES (ver 9.1, CUFFT CUBLAS)
--     NVIDIA GPU arch:             30 35 37 50 52 60 61 70
--     NVIDIA PTX archs:
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.12)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.12)
--     numpy:                       /home/paperspace/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.14.2)
--     packages path:               lib/python2.7/dist-packages
-- 
--   Python (for build):            /usr/bin/python2.7
--     Pylint:                      /home/paperspace/anaconda3/bin/pylint (ver: 1.7.4, checks: 113)
-- 
--   Java:
--     ant:                         NO
--     JNI:                         /usr/lib/jvm/java-9-oracle/include /usr/lib/jvm/java-9-oracle/include/linux /usr/lib/jvm/java-9-oracle/include
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Matlab:                        NO
-- 
--   Install to:                    /usr/local
-- Build files have been written to: /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/build
Scanning dependencies of target gen-pkgconfig
Scanning dependencies of target ippiw
Scanning dependencies of target ittnotify
Scanning dependencies of target libprotobuf
[  0%] Generate opencv.pc
[  0%] Building C object 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/src/ittnotify/ittnotify_static.c.o
[  0%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_transform_resize.c.o
[  0%] Built target gen-pkgconfig
[  1%] Building C object 3rdparty/ittnotify/CMakeFiles/ittnotify.dir/src/ittnotify/jitprofiling.c.o
[  1%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o
[  1%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arenastring.cc.o
[  1%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_copy.c.o
Scanning dependencies of target opencv_ts_pch_dephelp
[  1%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_core.c.o
[  1%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/extension_set.cc.o
[  2%] Building CXX object modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.o
[  2%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_copy_make_border.c.o
[  2%] Linking C static library ../lib/libittnotify.a
[  2%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_own.c.o
[  2%] Built target ittnotify
[  2%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_color_convert_all.c.o
[  2%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/generated_message_util.cc.o
[  2%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_set_channel.c.o
[  2%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_gaussian.c.o
Scanning dependencies of target opencv_core_pch_dephelp
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_sobel.c.o
[  3%] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_transform_warpaffine.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_copy_channel.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_morphology.c.o
[  3%] Linking CXX static library ../../lib/libopencv_ts_pch_dephelp.a
[  3%] Built target opencv_ts_pch_dephelp
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_copy_merge.c.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/coded_stream.cc.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_scale.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_canny.c.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream.cc.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_transform_rotate.c.o
Scanning dependencies of target opencv_imgproc_pch_dephelp
[  3%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.o
[  3%] Linking CXX static library ../../lib/libopencv_core_pch_dephelp.a
[  3%] Built target opencv_core_pch_dephelp
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/message_lite.cc.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl_lite.cc.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_general.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_bilateral.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_transform_mirror.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_laplacian.c.o
Scanning dependencies of target opencv_imgcodecs_pch_dephelp
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_copy_split.c.o
[  3%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_pch_dephelp.cxx.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/repeated_field.cc.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_scharr.c.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_color_convert_rgbs.c.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_box.c.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/bytestream.cc.o
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_set.c.o
[  3%] Linking CXX static library ../../lib/libopencv_imgproc_pch_dephelp.a
[  3%] Built target opencv_imgproc_pch_dephelp
[  3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_op_swap_channels.c.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/common.cc.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/int128.cc.o
[  3%] Linking C static library ../lib/libippiw.a
[  3%] Built target ippiw
Scanning dependencies of target opencv_videoio_pch_dephelp
[  3%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.o
[  3%] Linking CXX static library ../../lib/libopencv_imgcodecs_pch_dephelp.a
[  3%] Built target opencv_imgcodecs_pch_dephelp
Scanning dependencies of target opencv_highgui_pch_dephelp
Scanning dependencies of target opencv_perf_core_pch_dephelp
[  3%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.o
[  3%] Building CXX object modules/core/CMakeFiles/opencv_perf_core_pch_dephelp.dir/opencv_perf_core_pch_dephelp.cxx.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/once.cc.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/status.cc.o
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/statusor.cc.o
[  3%] Linking CXX static library ../../lib/libopencv_perf_core_pch_dephelp.a
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/stringpiece.cc.o
[  3%] Built target opencv_perf_core_pch_dephelp
[  3%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/stringprintf.cc.o
[  3%] Linking CXX static library ../../lib/libopencv_videoio_pch_dephelp.a
[  3%] Built target opencv_videoio_pch_dephelp
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/structurally_valid.cc.o
Scanning dependencies of target opencv_test_core_pch_dephelp
[  4%] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o
Scanning dependencies of target pch_Generate_opencv_perf_core
[  4%] Linking CXX static library ../../lib/libopencv_highgui_pch_dephelp.a
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/strutil.cc.o
[  4%] Generating perf_precomp.hpp
[  4%] Generating perf_precomp.hpp.gch/opencv_perf_core_RELEASE.gch
[  4%] Built target opencv_highgui_pch_dephelp
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/time.cc.o
Scanning dependencies of target opencv_cudaarithm_pch_dephelp
[  4%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm_pch_dephelp.dir/opencv_cudaarithm_pch_dephelp.cxx.o
In file included from /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts.hpp:660:0,
                 from /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/core/test/test_precomp.hpp:13,
                 from /home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/build/modules/core/opencv_test_core_pch_dephelp.cxx:1:
/home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts/ocl_test.hpp: In member function ‘void cvtest::ocl::{anonymous}::Interpolation::PrintTo(std::ostream*) const’:
/home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts/ocl_test.hpp:358:78: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
 CV_ENUM(Interpolation, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA, INTER_LINEAR_EXACT)
                                                                              ^
/home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts/ts_perf.hpp:113:34: note: in definition of macro ‘CV_ENUM’
             const int vals[] = { __VA_ARGS__ };                                         \
                                  ^
/home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts/ocl_test.hpp: In static member function ‘static testing::internal::ParamGenerator<cvtest::ocl::{anonymous}::Interpolation> cvtest::ocl::{anonymous}::Interpolation::all()’:
/home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts/ocl_test.hpp:358:78: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
 CV_ENUM(Interpolation, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA, INTER_LINEAR_EXACT)
                                                                              ^
/home/paperspace/Documents/Install-OpenCV-master/Ubuntu/OpenCV/opencv-3.4.0/modules/ts/include/opencv2/ts/ts_perf.hpp:128:41: note: in definition of macro ‘CV_ENUM’
             const class_name vals[] = { __VA_ARGS__ };                                  \
                                         ^
[  4%] Linking CXX static library ../../lib/libopencv_cudaarithm_pch_dephelp.a
[  4%] Built target opencv_cudaarithm_pch_dephelp
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/wire_format_lite.cc.o
Scanning dependencies of target opencv_perf_cudaarithm_pch_dephelp
modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o] Error 1
CMakeFiles/Makefile2:1760: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  4%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_perf_cudaarithm_pch_dephelp.dir/opencv_perf_cudaarithm_pch_dephelp.cxx.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/any.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/any.pb.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/api.pb.cc.o
[  4%] Built target pch_Generate_opencv_perf_core
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o
[  4%] Linking CXX static library ../../lib/libopencv_perf_cudaarithm_pch_dephelp.a
[  4%] Built target opencv_perf_cudaarithm_pch_dephelp
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.pb.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor_database.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/duration.pb.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/dynamic_message.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/empty.pb.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/extension_set_heavy.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/field_mask.pb.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/generated_message_reflection.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/gzip_stream.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/printer.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/strtod.cc.o
[  4%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/tokenizer.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/map_field.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/message.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/reflection_ops.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/service.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/source_context.pb.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/struct.pb.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/mathlimits.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/substitute.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/text_format.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/type.pb.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/unknown_field_set.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/field_comparator.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/field_mask_util.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/datapiece.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/default_value_objectwriter.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/field_mask_utility.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_escaping.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_objectwriter.cc.o
[  5%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_stream_parser.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/object_writer.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/proto_writer.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/protostream_objectsource.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/protostream_objectwriter.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/type_info.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/utility.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/json_util.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/message_differencer.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/time_util.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/type_resolver_util.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/wire_format.cc.o
[  6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/wrappers.pb.cc.o
[  6%] Linking CXX static library ../lib/liblibprotobuf.a
[  6%] Built target libprotobuf
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2`

OpenCV Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin )

After i run "Install-OpenCV/Ubuntu/2.4/opencv2_4_10.sh", i got follow errors when i run jar using opencv.

input

java -cp /opt/data/VideoSynopsis.jar com.video.synopsis.VideoSynopsis /opt/data/video_synopsis/

output

2016-04-10 19:24:20.835 | INFO | Starting getFrames... | com.video.synopsis.BackgroundSubtraction.getFrames | BackgroundSubtraction.java:22 
2016-04-10 19:24:20.837 | INFO | Video is [{}]... | com.video.synopsis.BackgroundSubtraction.getFrames | BackgroundSubtraction.java:23 
OpenCV Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /home/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/linux-x86_64/opencv-2.4.10/modules/highgui/src/cap_gstreamer.cpp, line 1622
Exception in thread "main" java.lang.RuntimeException: /home/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/linux-x86_64/opencv-2.4.10/modules/highgui/src/cap_gstreamer.cpp:1622: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
 in function handlemessage

    at org.bytedeco.javacpp.opencv_highgui.cvCreateFileCapture(Native Method)
    at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:169)
    at com.video.synopsis.BackgroundSubtraction.getFrames(BackgroundSubtraction.java:36)
    at com.video.synopsis.VideoSynopsis.main(VideoSynopsis.java:21)

Please help me to slove it...

script fails if parent directory has a space

I'm using Ubuntu 14.04.3 LTS (Edubuntu).

I cloned the repo into ~/Documents/Foo BAR/asdf/Install-OpenCV and ran the opencv_latest.sh script found on the Ubuntu directory.

It failed because it couldn't find some .hpp file (can't remember the name now and I'm very busy, sorry).

I found the script had put it into ~/Documents/Foo\ BAR/asdf/Install-OpenCV/somewhere/file.hpp

Note the Foo\ BAR instead of Foo BAR. There's obviously an escaping problem somewhere.

Then I copied the contents from Foo\ BAR into Foo BAR and ran the script again.

It failed because mkdir couldn't create the build directory (it already existed).

So my workaround was to clone the repo again into /tmp/Install-OpenCV, instead.

Would including an if statement before the mkdir one to check the directory doesn't already exist also make sense? I'm not sure.

Thanks for your efforts.

Case Senstivity

Instead of OpenCV-2.4.5.tar.gz it should be opencv-2.4.5.tar.gz

I made this change and the script worked like magic :)

Cheers

Unable to locate package libqt5-dev

I'm trying to install opencv on ubuntu 16.04. When I run the script it stops with the message:
"E: Unable to locate package libqt5-dev"

Any help fixing this would be appreciated.

Is it redundant ffmpeg and libavcodec-dev??

Hi
I have Fedora 17 and the CMake does not detect my ffmpeg compilation. I check your script and note that you propose:

  1. Install the ffmpeg libraries (libavcodec and so on) with apt-get
  2. Install ffmpeg without specify prefix so it is located in /usr/local/

I think that 1 and 2 are redundant and it is possible that cmake catched the packages installed using apt-get instead of the ffmpeg library compilation. Could you check that?

Ubuntu 17.04 E: Unable to locate package x264

Running on Ubuntu 17.04, unable to run it properly.

zhiwei@zhiwei-Lenovo-Rescuer-15ISK:~/Install-OpenCV/Ubuntu$ sudo proxychains bash opencv_latest.sh
[sudo] password for zhiwei:
ProxyChains-3.1 (http://proxychains.sf.net)
|DNS-request| sourceforge.net
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| sourceforge.net is 216.34.181.60
|S-chain|-<>-127.0.0.1:1080-<><>-216.34.181.60:443-<><>-OK
|S-chain|-<>-127.0.0.1:1080-<><>-216.34.181.60:443-<><>-OK
URL transformed to HTTPS due to an HSTS policy
Spider mode enabled. Check if remote file exists.
--2017-08-07 10:32:53-- https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/3.3.0/opencv-3.3.0.tar.gz/download
Resolving sourceforge.net (sourceforge.net)... |DNS-request| sourceforge.net
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| sourceforge.net is 216.34.181.60
216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:443... |S-chain|-<>-127.0.0.1:1080-<><>-216.34.181.60:443-<><>-OK
connected.
HTTP request sent, awaiting response... 404 Not Found
Remote file does not exist -- broken link!!!

URL transformed to HTTPS due to an HSTS policy
Spider mode enabled. Check if remote file exists.
--2017-08-07 10:32:54-- https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/3.3.0/opencv-3.3.0.zip/download
Resolving sourceforge.net (sourceforge.net)... |DNS-request| sourceforge.net
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| sourceforge.net is 216.34.181.60
216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:443... |S-chain|-<>-127.0.0.1:1080-<><>-216.34.181.60:443-<><>-OK
connected.
HTTP request sent, awaiting response... 302 Found
Location: https://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/3.3.0/opencv-3.3.0.zip?r=&ts=1502073176&use_mirror=jaist [following]
Spider mode enabled. Check if remote file exists.
--2017-08-07 10:32:56-- https://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/3.3.0/opencv-3.3.0.zip?r=&ts=1502073176&use_mirror=jaist
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... |DNS-request| downloads.sourceforge.net
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| downloads.sourceforge.net is 216.34.181.59
216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:443... |S-chain|-<>-127.0.0.1:1080-<><>-216.34.181.59:443-<><>-OK
connected.
HTTP request sent, awaiting response... 302 Found
Location: https://jaist.dl.sourceforge.net/project/opencvlibrary/opencv-unix/3.3.0/opencv-3.3.0.zip [following]
Spider mode enabled. Check if remote file exists.
--2017-08-07 10:32:58-- https://jaist.dl.sourceforge.net/project/opencvlibrary/opencv-unix/3.3.0/opencv-3.3.0.zip
Resolving jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)... |DNS-request| jaist.dl.sourceforge.net
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| jaist.dl.sourceforge.net is 150.65.7.130
150.65.7.130
Connecting to jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)|150.65.7.130|:443... |S-chain|-<>-127.0.0.1:1080-<><>-150.65.7.130:443-<><>-OK
connected.
HTTP request sent, awaiting response... 200 OK
Length: 84873317 (81M) [application/octet-stream]
Remote file exists.

|DNS-response|: zhiwei-Lenovo-Rescuer-15ISK does not exist
|DNS-response|: zhiwei-Lenovo-Rescuer-15ISK does not exist
sudo: unable to resolve host zhiwei-Lenovo-Rescuer-15ISK
--- Installing OpenCV 3.3.0
--- Installing Dependencies
--- Removing any pre-installed ffmpeg and x264
|DNS-response|: zhiwei-Lenovo-Rescuer-15ISK does not exist
|DNS-response|: zhiwei-Lenovo-Rescuer-15ISK does not exist
sudo: unable to resolve host zhiwei-Lenovo-Rescuer-15ISK
E: Unable to locate package x264
zhiwei@zhiwei-Lenovo-Rescuer-15ISK:~/Install-OpenCV/Ubuntu$

Readme fix

"ArchLinux

if your system is RedHat, (ArchLinux i guess ?) run the commands below.

$ cd ArchLinux
$ chmod +x *
$ ./opencv2_4_0.sh

Unable to download opencv 2.4.10

Ubuntu 14.04

Error message:

Connecting to sourceforge.net (sourceforge.net)|54.239.152.188|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://sourceforge.net/#!/projects/opencvlibrary/files/opencv-unix/2.4.10/opencv-2.4.10.zip/download [following]
--2014-12-04 10:26:56-- http://sourceforge.net/
Reusing existing connection to sourceforge.net:80.
HTTP request sent, awaiting response... 200 OK
Length: 635 [text/html]
Saving to: ‘opencv-2.4.10.zip’

100%[======================================>] 635 --.-K/s in 0s

2014-12-04 10:26:56 (55.9 MB/s) - ‘opencv-2.4.10.zip’ saved [635/635]

--- Installing OpenCV 2.4.10
opencv-2.4.10.zip
Archive: opencv-2.4.10.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-2.4.10.zip or
opencv-2.4.10.zip.zip, and cannot find opencv-2.4.10.zip.ZIP, period.

Building 2.4.10: Cannot allocate memory

Hi, i can't build 2.4.10 on DigitalOcean Ubuntu 14.04 4GB and 8GB droplets because of

[  9%] Building CXX object modules/contrib/CMakeFiles/opencv_contrib_pch_dephelp.dir/opencv_contrib_pch_dephelp.cxx.o
Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching_pch_dephelp.dir/opencv_test_stitching_pch_dephelp.cxx.o
Building CXX object modules/superres/CMakeFiles/opencv_test_superres_pch_dephelp.dir/opencv_test_superres_pch_dephelp.cxx.o
Building CXX object modules/superres/CMakeFiles/opencv_superres_pch_dephelp.dir/opencv_superres_pch_dephelp.cxx.o
Building CXX object modules/stitching/CMakeFiles/opencv_stitching_pch_dephelp.dir/opencv_stitching_pch_dephelp.cxx.o
virtual memory exhaustedvirtual memory exhausted: Cannot allocate memory
: Cannot allocate memory
virtual memory exhausted: Cannot allocate memory

Why simple script for building opencv requres so much memory?

opencv pip?

hi

why not we get it using pip for python ?

Uninstall version 3.0.0

Hi,

I installed the version 3.0.0 only to notice it doesn't compile with the calibration library I intend to use. Is there a standard way to purge the system of the 3.0 version and use a previous version?
Thanks!

Lakehanne

Install on 14.10 not working

Running the install script I get the following error

--- Installing dependency: libavcodec-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:
libavcodec-dev : Depends: libavcodec54 (<= 7:1.2.6-99) but it is not going to be installed or
libavcodec-extra-54 (<= 7:1.2.6-99) but it is not going to be installed
Depends: libavcodec54 (>= 7:1.2.6-1trusty1) but it is not going to be installed or
libavcodec-extra-54 (>= 7:1.2.6-1
trusty1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

It seems that libavc-dev has been removed.

libopencv-dev : The ppa:jonathonf/ffmpeg4 has been removed.

Trying to execute the shell scripts on a bionic 18.04 Ubuntu, I got a 403 Forbidden [IP: 91.189.95.83 80] error :

The following NEW packages will be installed:
  gir1.2-gtk-2.0 libavcodec-dev libavformat-dev libavutil-dev libcv-dev
  libcvaux-dev libgtk2.0-dev libgtkglext1 libhighgui-dev libilmbase-dev
  libjasper-dev libjasper1 libopencv-calib3d-dev libopencv-calib3d2.4v5
  libopencv-contrib-dev libopencv-contrib2.4v5 libopencv-core-dev
  libopencv-core2.4v5 libopencv-dev libopencv-features2d-dev
  libopencv-features2d2.4v5 libopencv-flann-dev libopencv-flann2.4v5
  libopencv-gpu-dev libopencv-gpu2.4v5 libopencv-highgui-dev
  libopencv-highgui2.4v5 libopencv-imgproc-dev libopencv-imgproc2.4v5
  libopencv-legacy-dev libopencv-legacy2.4v5 libopencv-ml-dev
  libopencv-ml2.4v5 libopencv-nonfree2.4v5 libopencv-objdetect-dev
  libopencv-objdetect2.4v5 libopencv-ocl-dev libopencv-ocl2.4v5
  libopencv-photo-dev libopencv-photo2.4v5 libopencv-stitching-dev
  libopencv-stitching2.4v5 libopencv-superres-dev
  libopencv-superres2.4v5 libopencv-ts-dev libopencv-ts2.4v5
  libopencv-video-dev libopencv-video2.4v5 libopencv-videostab-dev
  libopencv-videostab2.4v5 libopencv2.4-java libopencv2.4-jni
  libopenexr-dev libpangox-1.0-0 libswresample-dev libswscale-dev
  libxml2-utils opencv-data
0 upgraded, 58 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,286 kB/23.9 MB of archives.
After this operation, 122 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu bionic/main amd64 libavutil-dev amd64 7:4.2.1-0york0~18.04.1
  403  Forbidden [IP: 91.189.95.83 80]
Err:2 http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu bionic/main amd64 libswresample-dev amd64 7:4.2.1-0york0~18.04.1
  403  Forbidden [IP: 91.189.95.83 80]
Err:3 http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu bionic/main amd64 libavcodec-dev amd64 7:4.2.1-0york0~18.04.1
  403  Forbidden [IP: 91.189.95.83 80]
Err:4 http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu bionic/main amd64 libavformat-dev amd64 7:4.2.1-0york0~18.04.1
  403  Forbidden [IP: 91.189.95.83 80]
Err:5 http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu bionic/main amd64 libswscale-dev amd64 7:4.2.1-0york0~18.04.1
  403  Forbidden [IP: 91.189.95.83 80]
E: Failed to fetch http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu/pool/main/f/ffmpeg/libavutil-dev_4.2.1-0york0~18.04.1_amd64.deb  403  Forbidden [IP: 91.189.95.83 80]
E: Failed to fetch
...

After a few hours of struggle, found out that The ppa:jonathonf/ffmpeg4 has been removed by its author.

See https://launchpad.net/~jonathonf/+archive/ubuntu/ffmpeg-4

This PPA has been removed from public access as part of a protest against the abuse of open-source projects by large companies. For more detail visit the main page here: https://launchpad.net/~jonathonf

Is there any alternative, or a way around this problem.

Thanks.

I got Install error on Ubuntu 14.04

Hi,

I got error when installing on Ubuntu 14.04. Any tips solving this?:

c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions.
make[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.pb.cc.o] Error 4
make[1]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 17%] Built target pch_Generate_opencv_core
[ 17%] Built target pch_Generate_opencv_imgproc
[ 17%] Built target pch_Generate_opencv_ts
make: *** [all] Error 2

Video encoding issues

I've tried various versions of your installation scripts. While this does get OpenCV installed under Ubuntu 12.10 I'm not sure the final configuration is correct.

When attempting to use video recording from Python I get errors like this:

OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open

This is with the standard AVI codec. My test case is the application included here:

http://nummist.com/opencv/3923_02.zip

Run python cameo.py and hit tab to begin recording. I get an error. I think the issue is something to do with how opencv and ffmpeg but I'm not clear what: I don't have any issue playing avi files, so I think this is a configuration issue.

Any ideas?

Linking of OpenCV library with Qt 5

cmake should build with qt5 library for latest installs of qt instead of qt4
"sudo apt-get -y install libqt4-dev libgtk2.0-dev" needs update

openCV 3.0 installing to /usr/local/include/opencv2

I'd expect it to install to /usr/local/include/opencv3, it looks like no one has updated this yet.

Also, I was a little surprised that installing the latest installed a release candidate and not the lastest stable version. I'm not sure if that is intended or not.

Thanks for making this project.

./opencv_latest.sh: line 2: ./../get_latest_version_download_file.sh: No such file or directory

The script I run on the centos7 system

[root@hadoop01 RedHat]# ./opencv_latest.sh
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.cn99.com
  • extras: mirrors.cqu.edu.cn
  • updates: mirrors.cn99.com
    Package wget-1.14-15.el7_4.1.x86_64 already installed and latest version
    Nothing to do
    ./opencv_latest.sh: line 2: ./../get_latest_version_download_file.sh: No such file or directory

Installation error: ffmpeg

Tried to install OpenCV in Ubuntu 14.04, got the following error.

--- Installing dependency: ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ffmpeg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ffmpeg' has no installation candidate

Get Error when install OpenCV

When I run this shell, I got the following error:
Any one can help me?
Thanks!

modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/cuda_compile_generated_matrix_operations.cu.o' failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/cuda_compile_generated_matrix_operations.cu.o] Error 1
CMakeFiles/Makefile2:890: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 19%] Built target pch_Generate_opencv_videostab
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Unable to locate package libjasper-dev

--- Installing dependency: libjasper-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libjasper-dev

any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.