mac环境搭建

brew#

参考:https://zhuanlan.zhihu.com/p/111014448

Copy Highlighter-hljs
## 更新 homebrew-cask cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask # 更换源 git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git # 更新,由于已经 cd 到相应文件夹了,因此不需要通过 -C 指定路径了 git fetch --unshallow ## 更新 homebrew-core cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-core # 更换源 git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git # 更新 git fetch --unshallow

记录: homebrew-core is a shallow clone#

参考:https://zhuanlan.zhihu.com/p/351199589

Mac更新完系统后使用homebrew就报错:

Copy Highlighter-hljs
lideMacBook-Pro:~ li$ brew update Error: homebrew-core is a shallow clone. To `brew update`, first run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow This command may take a few minutes to run due to the large size of the repository. This restriction has been made on GitHub's request because updating shallow clones is an extremely expensive operation due to the tree layout and traffic of Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you automatically to avoid repeatedly performing an expensive unshallow operation in CI systems (which should instead be fixed to not use shallow clones). Sorry for the inconvenience!

解决办法:

Copy Highlighter-hljs
cd /usr/local/Homebrew/Library/Taps/homebrew rm -rf homebrew-core rm -rf homebrew-cask brew upgrade

使用脚本实现SSH免密#

Copy Highlighter-hljs
新建一个 .ssh 文件 vim pi4.ssh 添加如下内容 #!/usr/bin/expect -f set user ABC set host 123.123.123.123 set password 112233 set port 5000 set timeout -1 spawn ssh $user@$host -oPort=$port expect "password:*" send "$password\r" interact 终端中运行一下命令即可 expect pi4.ssh
posted @   快乐的提千万  阅读(30)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
点击右上角即可分享
微信分享提示
CONTENTS