以下のサイトを参考にCentOS8にOpenCVをインストールを試みています。
https://linuxize.com/post/how-to-install-opencv-on-centos-8/
ソースからのopencvのインストールを行っており
・依存関係のインストール
・OpenCVとOpenCVコントリビュートリポジトリの両方のクローンを作成
・一時ビルドディレクトリの作成
を行った後
・CMakeコマンドを使用してOpenCVビルドを構成
を行ったのですがCMakeに関してのエラーが多数表示されました。
$ cmake3 -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_GENERATE_PKGCONFIG=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON .. CMake Error at cmake/OpenCVUtils.cmake:885 (file): file problem creating directory: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/dephelper Call Stack (most recent call first): CMakeLists.txt:82 (include) CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:174 (file): file failed to open for writing (No such file or directory): /home/hogehoge/opencv_build/opencv/build/CMakeFiles/CMakeOutput.log Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) CMake Error: Could not open file for write in copy operation /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CMakeSystem.cmake.tmp CMake Error: : System Error: No such file or directory CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:186 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:145 (file): file problem creating directory: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:145 (file): file problem creating directory: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:145 (file): file problem creating directory: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:145 (file): file problem creating directory: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:145 (file): file problem creating directory: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CompilerIdCXX Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:107 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:109 (enable_language) ーーーーー中略ーーーーー CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:706 (file): file failed to open for writing (No such file or directory): /home/hogehoge/opencv_build/opencv/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:51 (CMAKE_DETERMINE_COMPILER_ID_VENDOR) /usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:109 (enable_language) -- The C compiler identification is unknown CMake Error: Could not open file for write in copy operation /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CMakeCCompiler.cmake.tmp CMake Error: : System Error: No such file or directory CMake Error at /usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake:192 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) CMake Error: Could not find cmake module file: /home/hogehoge/opencv_build/opencv/build/CMakeFiles/3.11.4/CMakeCCompiler.cmake -- Check for working CXX compiler: /usr/bin/c++ CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:25 (file): file failed to open for writing (No such file or directory): /home/hogehoge/opencv_build/opencv/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:30 (try_compile): Unknown extension ".cxx" for file /home/hogehoge/opencv_build/opencv/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx try_compile() works only for enabled languages. Currently these are: C CXX See project() command to enable other languages. Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) -- Check for working CXX compiler: /usr/bin/c++ -- broken CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:41 (file): file failed to open for writing (No such file or directory): /home/hogehoge/opencv_build/opencv/build/CMakeFiles/CMakeError.log Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message): The C++ compiler "/usr/bin/c++" is not able to compile a simple test program. It fails with the following output: CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:109 (enable_language) -- Configuring incomplete, errors occurred! CMake Error: Cannot open file for write: /home/hogehoge/opencv_build/opencv/build/CMakeCache.txt.tmp CMake Error: : System Error: Permission denied CMake Error: Unable to open cache file for save. /home/hogehoge/opencv_build/opencv/build/CMakeCache.txt CMake Error: : System Error: Permission denied
以前、cmakeに関してnot found等のエラーが出たため以下のサイトを参考にcmake-3.15.2をインストールしている状態です。
http://qiita.com/chemsis/items/efff39a67717e1ee2fb3
cmakeのインストール方法が悪かったのか、何が原因なのか分からない状態です。
何卒お力添えをいただきますよう、お願い申し上げます。
あなたの回答
tips
プレビュー