質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

CMake

CMakeはクロスプラットフォームで作動するオープンソースのビルドシステムです。コマンドライン又は組み込まれた開発環境で使うことができる元のmakefileとプロジェクトファイルを生成します。

OpenCV

OpenCV(オープンソースコンピュータービジョン)は、1999年にインテルが開発・公開したオープンソースのコンピュータビジョン向けのクロスプラットフォームライブラリです。

Q&A

0回答

2082閲覧

CentOS8にOpenCVをインストールする際のCMakeエラーについて

spmgolb_4

総合スコア1

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

CMake

CMakeはクロスプラットフォームで作動するオープンソースのビルドシステムです。コマンドライン又は組み込まれた開発環境で使うことができる元のmakefileとプロジェクトファイルを生成します。

OpenCV

OpenCV(オープンソースコンピュータービジョン)は、1999年にインテルが開発・公開したオープンソースのコンピュータビジョン向けのクロスプラットフォームライブラリです。

0グッド

1クリップ

投稿2020/11/25 05:36

以下のサイトを参考に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のインストール方法が悪かったのか、何が原因なのか分からない状態です。

何卒お力添えをいただきますよう、お願い申し上げます。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

take88

2020/11/27 07:08

ファイルの書き込みエラーのようですが、パーミッションが正しいか確認してみてください。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問