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 !成功

你可能感兴趣的:(数据仓库与BI)