qq_42221707
qq_42221707
采纳率0%
2021-03-02 11:19

ubuntu安装opencv,cmake出现以下代码错误,求解决

lijing@lijing-virtual-machine:~/opencv-3.4.0/release$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
CMake Error at cmake/OpenCVDownload.cmake:31 (file):
  file failed to open for writing (Permission denied):

    /home/lijing/opencv-3.4.0/release/CMakeDownloadLog.txt
Call Stack (most recent call first):
  CMakeLists.txt:127 (include)


CMake Error at cmake/OpenCVVersion.cmake:2 (file):
  file STRINGS file
  "/home/lijing/opencv-3.4.0/modules/core/include/opencv2/core/version.hpp"
  cannot be read.
Call Stack (most recent call first):
  CMakeLists.txt:332 (include)


CMake Error: File /home/lijing/opencv-3.4.0/modules/core/include/opencv2/core/version.hpp does not exist.
CMake Error at cmake/OpenCVVersion.cmake:18 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:332 (include)


-- Looking for ccache - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.11", minimum required is "1.2.3") 
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/libtiff/tif_config.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/libtiff/CMakeLists.txt:364 (configure_file):
  configure_file Problem configuring file


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/libtiff/tiffconf.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/libtiff/CMakeLists.txt:367 (configure_file):
  configure_file Problem configuring file


-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/openexr/IlmBaseConfig.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/openexr/CMakeLists.txt:17 (configure_file):
  configure_file Problem configuring file


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/openexr/OpenEXRConfig.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/openexr/CMakeLists.txt:19 (configure_file):
  configure_file Problem configuring file


-- Checking for module 'gtk+-3.0'
--   No package 'gtk+-3.0' found
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-video-1.0'
--   No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
--   No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
--   No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
--   No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
--   No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
--   No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
--   No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
--   No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
--   No package 'gstreamer-pbutils-0.10' found
-- Checking for module 'libdc1394-2'
--   No package 'libdc1394-2' found
-- Checking for module 'libdc1394'
--   No package 'libdc1394' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
--   No package 'libavcodec' found
--   No package 'libavformat' found
--   No package 'libavutil' found
--   No package 'libswscale' found
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
CMake Error at cmake/OpenCVDownload.cmake:38 (file):
  file failed to open for writing (Permission denied):

    /home/lijing/opencv-3.4.0/release/CMakeDownloadLog.txt
Call Stack (most recent call first):
  cmake/OpenCVDownload.cmake:106 (ocv_download_log)
  3rdparty/ippicv/ippicv.cmake:42 (ocv_download)
  cmake/OpenCVFindIPP.cmake:243 (download_ippicv)
  cmake/OpenCVFindLibsPerf.cmake:12 (include)
  CMakeLists.txt:603 (include)


-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) 
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Could NOT find JNI (missing: JAVA_AWT_INCLUDE_PATH) 
-- Could NOT find Pylint (missing: PYLINT_EXECUTABLE) 
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
CMake Error at CMakeLists.txt:775 (add_subdirectory):
  add_subdirectory given source "include" which is not an existing directory.


CMake Error at CMakeLists.txt:778 (add_subdirectory):
  The source directory

    /home/lijing/opencv-3.4.0/modules

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:781 (add_subdirectory):
  add_subdirectory given source "doc" which is not an existing directory.


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/opencv2/cvconfig.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at cmake/OpenCVGenHeaders.cmake:3 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:805 (include)


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/opencv2/opencv_modules.hpp.tmp
CMake Error: : System Error: Permission denied
CMake Error at cmake/OpenCVGenHeaders.cmake:31 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:805 (include)


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/unix-install/OpenCVConfig-version.cmake.tmp
CMake Error: : System Error: Permission denied
CMake Error at cmake/OpenCVGenConfig.cmake:87 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  cmake/OpenCVGenConfig.cmake:107 (ocv_gen_config)
  CMakeLists.txt:817 (include)


-- 
-- General configuration for OpenCV .. =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Timestamp:                   2021-03-01T14:31:23Z
--     Host:                        Linux 4.15.0-29-generic x86_64
--     CMake:                       3.10.2
--     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 (0 files):          + SSSE3 SSE4_1
--       SSE4_2 (0 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (0 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++11:                       YES
--     C++ Compiler:                /usr/bin/c++  (ver 7.5.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 -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden   -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 -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden   -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 -Wno-implicit-fallthrough -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 -Wno-implicit-fallthrough -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:
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 -
--     Disabled:                    -
--     Disabled by dependency:      -
--     Unavailable:                 -
--     Applications:                apps
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
--     GTK+:                        YES (ver 2.24.32)
--       GThread :                  YES (ver 2.56.4)
--       GtkGlExt:                  NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        libjpeg (ver 90)
--     WEBP:                        build (ver encoder: 0x020e)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
--     TIFF:                        build (ver 42 - 4.0.9)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      NO
--       avcodec:                   NO
--       avformat:                  NO
--       avutil:                    NO
--       swscale:                   NO
--       avresample:                NO
--     GStreamer:                   NO
--     libv4l/libv4l2:              NO
--     v4l/v4l2:                    linux/videodev2.h
--     gPhoto2:                     NO
-- 
--   Parallel framework:            pthreads
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Lapack:                      NO
--     Eigen:                       NO
--     Custom HAL:                  NO
-- 
--   NVIDIA CUDA:                   NO
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/lijing/opencv-3.4.0/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python (for build):            
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Matlab:                        NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
-- 
CMake Error at cmake/OpenCVUtils.cmake:18 (file):
  file failed to open for writing (Permission denied):

    /home/lijing/opencv-3.4.0/release/CMakeVars.txt
Call Stack (most recent call first):
  CMakeLists.txt:1439 (ocv_cmake_dump_vars)


-- Configuring incomplete, errors occurred!
See also "/home/lijing/opencv-3.4.0/release/CMakeFiles/CMakeOutput.log".
See also "/home/lijing/opencv-3.4.0/release/CMakeFiles/CMakeError.log".
lijing@lijing-virtual-machine:~/opencv-3.4.0/release$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler ..
CMake Error at cmake/OpenCVDownload.cmake:31 (file):
  file failed to open for writing (Permission denied):

    /home/lijing/opencv-3.4.0/release/CMakeDownloadLog.txt
Call Stack (most recent call first):
  CMakeLists.txt:127 (include)


CMake Error at cmake/OpenCVVersion.cmake:2 (file):
  file STRINGS file
  "/home/lijing/opencv-3.4.0/modules/core/include/opencv2/core/version.hpp"
  cannot be read.
Call Stack (most recent call first):
  CMakeLists.txt:332 (include)


CMake Error: File /home/lijing/opencv-3.4.0/modules/core/include/opencv2/core/version.hpp does not exist.
CMake Error at cmake/OpenCVVersion.cmake:18 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:332 (include)


-- Looking for ccache - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.11", minimum required is "1.2.3") 
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/libtiff/tif_config.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/libtiff/CMakeLists.txt:364 (configure_file):
  configure_file Problem configuring file


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/libtiff/tiffconf.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/libtiff/CMakeLists.txt:367 (configure_file):
  configure_file Problem configuring file


-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/openexr/IlmBaseConfig.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/openexr/CMakeLists.txt:17 (configure_file):
  configure_file Problem configuring file


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/3rdparty/openexr/OpenEXRConfig.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at 3rdparty/openexr/CMakeLists.txt:19 (configure_file):
  configure_file Problem configuring file


-- Checking for module 'gtk+-3.0'
--   No package 'gtk+-3.0' found
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-video-1.0'
--   No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
--   No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
--   No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
--   No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
--   No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
--   No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
--   No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
--   No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
--   No package 'gstreamer-pbutils-0.10' found
-- Checking for module 'libdc1394-2'
--   No package 'libdc1394-2' found
-- Checking for module 'libdc1394'
--   No package 'libdc1394' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
--   No package 'libavcodec' found
--   No package 'libavformat' found
--   No package 'libavutil' found
--   No package 'libswscale' found
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
CMake Error at cmake/OpenCVDownload.cmake:38 (file):
  file failed to open for writing (Permission denied):

    /home/lijing/opencv-3.4.0/release/CMakeDownloadLog.txt
Call Stack (most recent call first):
  cmake/OpenCVDownload.cmake:106 (ocv_download_log)
  3rdparty/ippicv/ippicv.cmake:42 (ocv_download)
  cmake/OpenCVFindIPP.cmake:243 (download_ippicv)
  cmake/OpenCVFindLibsPerf.cmake:12 (include)
  CMakeLists.txt:603 (include)


-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) 
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Could NOT find JNI (missing: JAVA_AWT_INCLUDE_PATH) 
-- Could NOT find Pylint (missing: PYLINT_EXECUTABLE) 
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
CMake Error at CMakeLists.txt:775 (add_subdirectory):
  add_subdirectory given source "include" which is not an existing directory.


CMake Error at CMakeLists.txt:778 (add_subdirectory):
  The source directory

    /home/lijing/opencv-3.4.0/modules

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:781 (add_subdirectory):
  add_subdirectory given source "doc" which is not an existing directory.


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/opencv2/cvconfig.h.tmp
CMake Error: : System Error: Permission denied
CMake Error at cmake/OpenCVGenHeaders.cmake:3 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:805 (include)


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/opencv2/opencv_modules.hpp.tmp
CMake Error: : System Error: Permission denied
CMake Error at cmake/OpenCVGenHeaders.cmake:31 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:805 (include)


CMake Error: Could not open file for write in copy operation /home/lijing/opencv-3.4.0/release/unix-install/OpenCVConfig-version.cmake.tmp
CMake Error: : System Error: Permission denied
CMake Error at cmake/OpenCVGenConfig.cmake:87 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  cmake/OpenCVGenConfig.cmake:107 (ocv_gen_config)
  CMakeLists.txt:817 (include)


-- 
-- General configuration for OpenCV .. =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Timestamp:                   2021-03-01T14:31:23Z
--     Host:                        Linux 4.15.0-29-generic x86_64
--     CMake:                       3.10.2
--     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 (0 files):          + SSSE3 SSE4_1
--       SSE4_2 (0 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (0 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++11:                       YES
--     C++ Compiler:                /usr/bin/c++  (ver 7.5.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 -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden   -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 -Wno-implicit-fallthrough -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden   -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 -Wno-implicit-fallthrough -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 -Wno-implicit-fallthrough -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:
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 -
--     Disabled:                    -
--     Disabled by dependency:      -
--     Unavailable:                 -
--     Applications:                apps
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
--     GTK+:                        YES (ver 2.24.32)
--       GThread :                  YES (ver 2.56.4)
--       GtkGlExt:                  NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        libjpeg (ver 90)
--     WEBP:                        build (ver encoder: 0x020e)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
--     TIFF:                        build (ver 42 - 4.0.9)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      NO
--       avcodec:                   NO
--       avformat:                  NO
--       avutil:                    NO
--       swscale:                   NO
--       avresample:                NO
--     GStreamer:                   NO
--     libv4l/libv4l2:              NO
--     v4l/v4l2:                    linux/videodev2.h
--     gPhoto2:                     NO
-- 
--   Parallel framework:            pthreads
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Lapack:                      NO
--     Eigen:                       NO
--     Custom HAL:                  NO
-- 
--   NVIDIA CUDA:                   NO
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/lijing/opencv-3.4.0/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python (for build):            
-- 
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Matlab:                        NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
-- 
CMake Error at cmake/OpenCVUtils.cmake:18 (file):
  file failed to open for writing (Permission denied):

    /home/lijing/opencv-3.4.0/release/CMakeVars.txt
Call Stack (most recent call first):
  CMakeLists.txt:1439 (ocv_cmake_dump_vars)


-- Configuring incomplete, errors occurred!
See also "/home/lijing/opencv-3.4.0/release/CMakeFiles/CMakeOutput.log".
See also "/home/lijing/opencv-3.4.0/release/CMakeFiles/CMakeError.log".
 

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • qq_34124780 qq_34124780 1月前

    有可能是权限不够,试试下

    $ sudo cmake ..

    点赞 评论 复制链接分享