- brew安装:
- homebrew 报权限错误”Permission denied”问题
- https://github.com/Homebrew/homebrew-services /usr/local/">Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-services /usr/local/
- Mac homebrew报错Error: homebrew-core is a shallow clone.
- 解决方法
- mac无法验证此app不包含恶意软件
- redis安装:
brew安装:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
homebrew 报权限错误”Permission denied”问题
原文:https://blog.90.vc/archives/512
==> Fetching /usr/local/Homebrew...
error: cannot open .git/FETCH_HEAD: Permission denied
error: Unable to create '/usr/local/Homebrew/.git/refs/remotes/origin/HEAD.lock': Permission denied
error: Could not setup refs/remotes/origin/HEAD
==> Resetting /usr/local/Homebrew...
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
error: cannot open .git/FETCH_HEAD: Permission denied
error: Unable to create '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/refs/remotes/origin/HEAD.lock': Permission denied
error: Could not setup refs/remotes/origin/HEAD
==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
fatal: Unable to create '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock': Permission denied
- 解决方式
sudo chown -R $(whoami) $(brew --prefix)/*
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-services /usr/local/
原文:https://blog.csdn.net/FindStar_ing/article/details/107383669
解决方案:chenjingwendeMacBook-Pro:~ chenjingwen$ brew services start nginx
==> Tapping homebrew/services
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services’…
fatal: unable to access ‘https://github.com/Homebrew/homebrew-services/’: Failed to connect to 127.0.0.1 port 1080: Connection refused
Error: Failure while executing; git clone https://github.com/Homebrew/homebrew-services /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services exited with 128.
Error: Failure while executing; /usr/local/bin/brew tap homebrew/services exited with 1.
chenjingwendeMacBook-Pro:~ chenjingwen$ git config --global --unset http.proxy
chenjingwendeMacBook-Pro:~ chenjingwen$ git config --global --unset https.proxy
chenjingwendeMacBook-Pro:~ chenjingwen$ brew services start nginx
==> Tapping homebrew/services
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services’…
remote: Enumerating objects: 52, done.
remote: Counting objects: 100% (52/52), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 829 (delta 20), reused 16 (delta 3), pack-reused 777
Receiving objects: 100% (829/829), 232.61 KiB | 3.00 KiB/s, done.
Resolving deltas: 100% (338/338), done.
Tapped 1 command (39 files, 310.3KB).
==> Successfully started nginx (label: homebrew.mxcl.nginx)
git config --global --unset http.proxy
git config --global --unset https.proxy
git clone git://mirrors.ustc.edu.cn/homebrew-cask.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask --depth=1
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
Mac homebrew报错Error: homebrew-core is a shallow clone.
原文:https://blog.csdn.net/weixin_35757704/article/details/112133562
解决方法
删除homebrew-core后更新即可
cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade
使用brew upgrade后会重新更新homebrew-core
mac无法验证此app不包含恶意软件
禁用Gatekeeper
sudo spctl --master-disable
redis安装:
brew 安装
brew install redis
启动:
To start redis:
brew services start redis
Or, if you don't want/need a background service you can just run:
/usr/local/opt/redis/bin/redis-server /usr/local/etc/redis.conf
==> Summary
🍺 /usr/local/Cellar/redis/6.2.5: 14 files, 2.0MB