mac安装cmake

1 brew安装cmake

lcc@lcc ~$ brew install cmake
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
sysdig                                                                  vapoursynth                                                             zimg

==> Downloading https://homebrew.bintray.com/bottles/cmake-3.11.4.high_sierra.bottle.tar.gz
Already downloaded: /Users/lcc/Library/Caches/Homebrew/cmake-3.11.4.high_sierra.bottle.tar.gz
==> Pouring cmake-3.11.4.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man7/cmake-buildsystem.7
/usr/local/share/man/man7 is not writable.

You can try again using:
  brew link cmake
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
==> Summary
��  /usr/local/Cellar/cmake/3.11.4: 2,363 files, 32.7MB
lcc@lcc ~$   brew link cmake
Linking /usr/local/Cellar/cmake/3.11.4...
Error: Could not symlink share/man/man7/cmake-buildsystem.7
/usr/local/share/man/man7 is not writabl

问题1:使用HomeBrew,例如:$ brew link cmake,会出现一下错误。

Could not symlink share/man/man7/cmake-buildsystem.7 /usr/local/share/man/man7 is not writable.

解决方法:

先执行 $ sudo chown -R $(whoami):admin /usr/local/share/man

后执行 $ brew link cmake

lcc@lcc ~$ sudo chown -R $(whoami):admin /usr/local/share/man
Password:
Sorry, try again.
Password:
lcc@lcc ~$ brew link cmake
Linking /usr/local/Cellar/cmake/3.11.4... 29 symlinks created
lcc@lcc ~$

你可能感兴趣的:(系统-mac苹果电脑)