mac系统升级后Homebrew:Mac os 使用brew工具时报错No remote ‘origin‘

  1. 现象
clike 复制代码
#brew update
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-cask, skipping update!
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-core, skipping update!
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
Already up-to-date.

解决办法:

clike 复制代码
#brew doctor
Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Suspicious https://github.com/Homebrew/brew git origin remote found.
The current git origin is:https://mirrors.ustc.edu.cn/brew.git

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
  git -C "/opt/homebrew" remote set-url origin https://github.com/Homebrew/brew

Warning: Homebrew/homebrew-cask was not tapped properly! Run:
  rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-cask"
  brew tap homebrew/cask

Warning: Homebrew/homebrew-core was not tapped properly! Run:
  rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
  brew tap homebrew/core

根据提示输入

clike 复制代码
#rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-cask"
#brew tap homebrew/cask
 ==> Tapping homebrew/cask
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 637993, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 637993 (delta 4), reused 9 (delta 4), pack-reused 637981
Receiving objects: 100% (637993/637993), 301.85 MiB | 7.85 MiB/s, done.
Resolving deltas: 100% (451622/451622), done.
Tapped 4019 casks (4,091 files, 322.3MB).

#rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-core"
#brew tap homebrew/core
 ==> Tapping homebrew/core
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1191036, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 1191036 (delta 2), reused 4 (delta 2), pack-reused 1191029
Receiving objects: 100% (1191036/1191036), 476.09 MiB | 10.04 MiB/s, done.
Resolving deltas: 100% (824978/824978), done.
Tapped 3 commands and 6066 formulae (6,405 files, 522.4MB).

执行brew update

clike 复制代码
#brew update  
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
Already up-to-date.
#brew doctor                                                               
Your system is ready to brew.
#rm -rf "/opt/homebrew/Library/Taps/homebrew/homebrew-services" 
#brew tap homebrew/services    
==> Tapping homebrew/services
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 2000, done.
remote: Counting objects: 100% (509/509), done.
remote: Compressing objects: 100% (176/176), done.
remote: Total 2000 (delta 348), reused 441 (delta 325), pack-reused 1491
Receiving objects: 100% (2000/2000), 548.53 KiB | 1.33 MiB/s, done.
Resolving deltas: 100% (903/903), done.
Tapped 1 command (45 files, 700.5KB). 
 #brew update     
Already up-to-date.

问题解决

相关推荐
AirDroid_cn2 天前
iOS 18 后台应用偷跑流量,如何限制?
macos·ios·cocoa
u***42072 天前
macOs安装docker且在docker上部署nginx+php
nginx·macos·docker
心灵宝贝2 天前
Mac Unity 2018.dmg游戏工具 安装步骤 简单易懂教程(附安装包)
macos·unity·游戏引擎
学习非暴力沟通的程序员3 天前
Mac 自动定时打开指定URL(无日历版)操作文档
macos
mixboot4 天前
macOS Homebrew 安装 Nmap
macos·nmap
Dream-Y.ocean4 天前
告别设备束缚!网易 UU 远程 Mac 被控体验:免费高清 + 多场景丝滑,跨端办公刚需神器
macos
❀͜͡傀儡师4 天前
docker安装mac系统
macos·docker·容器
库奇噜啦呼4 天前
【iOS】多线程学习
macos·ios·cocoa
守城小轩4 天前
Chromium 140 编译指南 macOS 篇:基础环境准备(一)
chrome·macos·chrome devtools·指纹浏览器·浏览器开发·超级浏览器
许泽宇的技术分享4 天前
用 OpenAI Whisper + pyannote.audio 打造“谁在说什么”的全栈语音理解系统
macos·whisper·xcode