【问题标题】:"file INSTALL cannot find <file>" when attempting to install CMake with Homebrew尝试使用 Homebrew 安装 CMake 时出现“文件安装找不到 <file>”
【发布时间】:2021-08-07 22:40:14
【问题描述】:

问题

在 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 文件的具体用途,但找不到。

【问题讨论】:

  • Sphinx 是生成文档的工具,而 ccmake.1 听起来很像这个页面的来源:cmake.org/cmake/help/latest/manual/ccmake.1.html。也许这些信息可以让您缩小问题范围...
  • 感谢您的提示。不幸的是,我无法从源页面收集任何线索。
  • 我也有这个错误。
  • 我在 MacOS 10.13 上也遇到了这个错误。有没有人知道是什么原因造成的?

标签: macos cmake homebrew


【解决方案1】:

我今天也遇到了这个问题。

我认为这与这里提到的补丁有关:https://gitlab.kitware.com/cmake/cmake/-/issues/22192

我重新安装 sphinx-doc 后问题就消失了:

brew reinstall sphinx-doc

我认为它就是这样做的——希望它对你有用。

【讨论】:

  • 解决了这个问题。感谢您的帮助。
猜你喜欢
  • 2023-03-05
  • 2021-07-17
  • 1970-01-01
  • 2020-08-07
  • 1970-01-01
  • 1970-01-01
  • 2021-01-26
  • 2015-08-05
  • 2018-12-16
相关资源
最近更新 更多