mac环境搭建
brew#
参考:https://zhuanlan.zhihu.com/p/111014448
## 更新 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就报错:
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!
解决办法:
cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
rm -rf homebrew-cask
brew upgrade
使用脚本实现SSH免密#
新建一个 .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
作者: 快乐的提千万
出处:https://www.cnblogs.com/HappyTeemo/p/17114110.html
版权:本站使用「CC BY 4.0」创作共享协议,未经作者同意,请勿转载;若经同意转载,请在文章明显位置注明作者和出处。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术