afunyusong的专栏

喜欢吹着春风,追着云

Mac brew install hadoop 出现 not linked

问题初始是 install 时 linked 不成功,导致后边hadoop不能用

~ ᐅ brew install hadoop
Updating Homebrew...
Warning: hadoop 2.8.1 is already installed, it's just not linked.
You can use `brew link hadoop` to link this version.

接着按提示执行出现:

~ ᐅ brew link hadoop
Linking /usr/local/Cellar/hadoop/2.8.1...
Error: Could not symlink bin/yarn
Target /usr/local/bin/yarn
already exists. You may want to remove it:
  rm '/usr/local/bin/yarn'

To force the link and overwrite all conflicting files:
  brew link --overwrite hadoop

To list all files that would be deleted:
  brew link --overwrite --dry-run hadoop

再接着执行,提示 /usr/local/sbin is not writable

~ ᐅ brew link --overwrite hadoop
Linking /usr/local/Cellar/hadoop/2.8.1...
Error: Could not symlink sbin/distribute-exclude.sh
/usr/local/sbin is not writable.

根据 stackoverflow 执行:

 ᐅ sudo chown -R `whoami`:admin /usr/local/sbin
 chown: /usr/local/sbin: No such file or directory

发现根本没有sbin这个文件夹,接着根据 stackoverflow 执行:

mkdir /usr/local/sbin
mkdir: /usr/local/sbin: Permission denied

这个简单,加 sudo 就好了

ᐅ sudo mkdir /usr/local/sbin

然后再次执行

ᐅ sudo chown -R `whoami`:admin /usr/local/sbin

ok,没报错,接着

ᐅ brew link hadoop
Linking /usr/local/Cellar/hadoop/2.8.1... 27 symlinks created

perfect !成功

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/afanyusong/article/details/78538467
文章标签: hadoop brew mac
个人分类: 数据仓库与BI
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭