簡體   English   中英

“文件安裝找不到<file> " 嘗試使用 Homebrew 安裝 CMake 時</file>

[英]"file INSTALL cannot find <file>" when attempting to install CMake with Homebrew

問題

在 MacOS 10.13 上運行brew install cmake時,安裝 CMake 失敗。 CMake 是我需要通過 Homebrew 安裝的其他軟件包的依賴項。

我看到的錯誤是:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f Source/CMakeFiles/ctest.dir/build.make Source/CMakeFiles/ctest.dir/build
make[2]: Nothing to be done for `Source/CMakeFiles/ctest.dir/build'.
[100%] Built target ctest
[100%] Built target documentation
/private/tmp/cmake-20210518-66635-xtovhf/cmake-3.20.2/Bootstrap.cmk/cmake -E cmake_progress_start /tmp/cmake-20210518-66635-xtovhf/cmake-3.20.2/CMakeFiles 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 preinstall
make[1]: Nothing to be done for `preinstall'.
Install the project...
bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/doc/cmake/cmsys/Copyright.txt
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/doc/cmake/cmlibrhash/COPYING
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/doc/cmake/cmzstd/LICENSE
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/doc/cmake/cmliblzma/COPYING
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/doc/cmake/cmlibarchive/COPYING
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/doc/cmake/cmlibuv/LICENSE
-- Installing: /usr/local/Cellar/cmake/3.20.2/bin/ccmake
-- Installing: /usr/local/Cellar/cmake/3.20.2/bin/cmake
-- Installing: /usr/local/Cellar/cmake/3.20.2/bin/ctest
-- Installing: /usr/local/Cellar/cmake/3.20.2/bin/cpack
-- Installing: /usr/local/Cellar/cmake/3.20.2/share/cmake/include/cmCPluginAPI.h
CMake Error at Utilities/Sphinx/cmake_install.cmake:41 (file):
  file INSTALL cannot find
  "/tmp/cmake-20210518-66635-xtovhf/cmake-3.20.2/Utilities/Sphinx/man/ccmake.1":
  No such file or directory.
Call Stack (most recent call first):
  Utilities/cmake_install.cmake:47 (include)
  cmake_install.cmake:102 (include)


以下是 Homebrew 日志中的一些信息,可能有用也可能沒用:

HOMEBREW_VERSION: 3.1.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: 92cf9047191393a2d624c64fc28d9595309ba273
Last commit: 7 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: d419775e7df0949c2e1d4facc437f52eef8b9f67
Core tap last commit: 4 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_BOOTSNAP: set
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 10.0.0 build 1000
Git: 2.17.2 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.13.6-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j12
CMAKE_PREFIX_PATH: /usr/local/opt/sphinx-doc:/usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.13
HOMEBREW_GIT: git
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/sphinx-doc/bin:/usr/bin:/bin:/usr/sbin:/sbin

我不明白為什么會出現“文件安裝找不到”錯誤,因為安裝腳本應該處理 /tmp/xxxxx 文件的生成、刪除或移動。 如果這是 PATH 的問題或其他問題,我希望在日志中看到這一點。

我試過的

我嘗試尋找 CMake 安裝位置,以查看 cmake_install 文件到底在做什么,但找不到它。

我今天也遇到了這個問題。

我認為它與這里提到的補丁有關: https://gitlab.kitware.com/cmake/cmake/-/issues/22192

重新安裝 sphinx-doc 后,我的問題就消失了:

brew reinstall sphinx-doc

我認為這就是它的作用——希望它對你有用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM