Mac 安装cmake小问题

Posted 明将军

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mac 安装cmake小问题相关的知识,希望对你有一定的参考价值。

今天用 brew install cmake。

 

==> Downloading https://homebrew.bintray.com/bottles/cmake-3.9.6.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring cmake-3.9.6.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/aclocal/cmake.m4

/usr/local/share/aclocal 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.9.6: 2,267 files, 31.7MB

 

brew install cmake

Warning: cmake 3.9.6 is already installed, it‘s just not linked.

You can use `brew link cmake` to link this version.

 

x-MacBook-Pro:primecount-master zilong$ brew link cmake

Linking /usr/local/Cellar/cmake/3.9.6... 

Error: Could not symlink share/aclocal/cmake.m4

/usr/local/share/aclocal is not writable.

 

x-MacBook-Pro:primecount-master zilong$ brew link cmake

Linking /usr/local/Cellar/cmake/3.9.6... 

Error: Could not symlink share/aclocal/cmake.m4

/usr/local/share/aclocal is not writable.

 

哦,原来是权限问题,那么通过赋权即可

 

sudo chown -R `whoami`:admin /usr/local/share/aclocal

再敲一遍即可

brew link cmake

 

 

 

 

以上是关于Mac 安装cmake小问题的主要内容,如果未能解决你的问题,请参考以下文章

即使已安装 CMake 也无法找到 gRPC 库(mac)

vmware下安装mac os虚拟机问题,最后还是最终攻克了被一个小失误给陷害了

Mac系统下brew安装指定版本的nodejs小笔记

MAC下cmake安装

mac os cmake安装

在安装目录中创建文本文件(Qt 应用程序)的问题(使用 CMake 安装)