简体   繁体   中英

Installing CMake command line tools on a Mac

I installed CMake literally two days ago with no problems through the GUI and selecting "Install Command Line Tools". I just got a brand new Macbook and trying to install CMake again but the option has changed to "How to Install Command Line Tools" and just crashes the app when clicked

Is there a reason it has changed? Is there another way to install the command line tools?

As of version 3.9.4, the "How to Install Command Line Tools" says:

One may add CMake to the PATH:

PATH="/Applications/CMake.app/Contents/bin":"$PATH"

Or, to install symlinks to '/usr/local/bin', run:

sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

Or, to install symlinks to another directory, run:

sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install=/path/to/bin

The middle option worked perfectly for what I needed: installing an older version of Swift using swiftenv .

Looks like CMake 3.3.0 is broken in that respect...

Anyone finding themselves in the same situation should do what I've just done and revert to 3.2.3 and then the "Install Command Line Tools" is back in business

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM