且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Mac 的 cmake 安装程序无法创建/usr/bin 符号链接

更新时间:2023-11-10 18:45:52

这也经常发生在我身上.

This tends to happen to me as well from time to time.

问题基本上是以前安装的符号链接在从应用程序中删除 CMake 时没有清理,现在安装程序无法将它们更新到新版本.

The problem is basically that the symlinks from the previous installation are not cleaned up when removing CMake from Applications and now the installer has trouble updating them to the new version.

这里最简单的解决方法是手动从 /usr/bin 中删除这些链接,然后重新运行安装程序.IIRC 至少是 cmakeccmakecmake-guicpackctest需要删除.***的方法是从控制台执行 ls -l/usr/bin 并为所有指向旧 CMake 安装目录的链接执行 grep.

The easiest fix here is to manually remove those links from /usr/bin and re-run the installer. IIRC it's at least cmake, ccmake, cmake-gui, cpack and ctest that need removing. Best way is to do a ls -l /usr/bin from the console and grep for all the links pointing to the old CMake installation directory.