インストールしようとしています。追加 cmake モジュールソースコードからコマンドを実行するとエラーが発生します make
。
Extension error:
Could not import extension ecm (exception: No module named 'sphinxcontrib')
make[2]: *** [docs/CMakeFiles/documentation.dir/build.make:62: docs/doc_format_html] Error 2
make[2]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make[1]: *** [CMakeFiles/Makefile2:217: docs/CMakeFiles/documentation.dir/all] Error 2
make[1]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make: *** [Makefile:163: all] Error 2
Sphinxモジュールに問題があるようです。しかし、それを削除して再インストールしてみましたpip
が、それでもエラーが発生します。では、問題を解決するにはどうすればよいですか?以下は、コマンドを実行したときのcmake -DCMAKE_INSTALL_PREFIX=/usr ..
ログですmake
。
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-- WARNING: skipping tests that require PyQt
-- The following features have been enabled:
* BUILD_HTML_DOCS, Generate HTML documentation for installed modules.
* BUILD_MAN_DOCS, Generate man page documentation for installed modules.
* BUILD_TESTING, Build automated tests.
-- The following OPTIONAL packages have been found:
* Sphinx (required version >= 1.2), Tool to generate documentation., <https://www.sphinx-doc.org/>
Required to build documentation for Extra CMake Modules.
* QCollectionGenerator, Qt help collection generator., <https://www.qt.io/>
Required to build Extra CMake Modules documentation in Qt Help format.
* Qt5LinguistTools, Qt5 linguist tools., <https://www.qt.io/>
Required to run tests for the ECMPoQmTools module.
* Qt5Core, Qt5 core library., <https://www.qt.io/>
Required to run tests for the ECMQtDeclareLoggingCategory module, and for some tests of the KDEInstallDirs module.
* Qt5Network (required version >= 5.14.2)
* Qt5Qml (required version >= 5.14.2)
* Qt5QmlModels (required version >= 5.14.2)
* Qt5Gui (required version >= 5.14.2)
* Qt5Quick, Qt5 Quick library., <https://www.qt.io/>
Required to run tests for the ECMQMLModules module.
-- The following features have been disabled:
* BUILD_QTHELP_DOCS, Generate QtHelp documentation for installed modules.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build
$ make
make[1]: Entering directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make[2]: Entering directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make[2]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make[2]: Entering directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
[ 50%] sphinx-build html: see /home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build/docs/build-html.log
/usr/lib/python3.8/importlib/__init__.py:127: RemovedInSphinx40Warning: The alias 'sphinx.util.pycompat.htmlescape' is deprecated, use 'html.escape' instead. Check CHANGES for Sphinx API modifications.
return _bootstrap._gcd_import(name[level:], package, level)
Extension error:
Could not import extension ecm (exception: No module named 'sphinxcontrib')
make[2]: *** [docs/CMakeFiles/documentation.dir/build.make:62: docs/doc_format_html] Error 2
make[2]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make[1]: *** [CMakeFiles/Makefile2:217: docs/CMakeFiles/documentation.dir/all] Error 2
make[1]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build'
make: *** [Makefile:163: all] Error 2
ベストアンサー1
他の人がこのエラーを誤って発見した場合に備えて、KDEインフラストラクチャについての後続の議論があります。 http://kde.6490.n7.nabble.com/Error-when-trying-to-install-ECM-Extra-Cmake-Modules-td1752955.html
回避策:python3-sphinxcontrib*
パッケージをインストールします(たとえば、pip3 install python3-sphinxcontrib
パッケージマネージャを介して)。
私にとっては専用の設置で十分ですpython3-sphinxcontrib.qthelp
。