Mac使用brew install 安装wget工具报错 fatal: not in a git directory Error: Command failed with exit 128: git

简介: Mac使用brew install 安装wget工具报错 fatal: not in a git directory Error: Command failed with exit 128: git

在Mac OS 通过 brew 安装wget工具时, 报如下错误


d0e9dda436724fc584e5a8c7a57fec5d.png

解决方法


1.先执行诊断,查看问题所在

brew doctor

会有如下警告提示


a79f1c9858644cae95596c27de86a5f1.png

2.根据警告, 执行提示的命令一一解决

如果不确定是否解决了部分问题,可以再次执行诊断查看

可以看到待解决的问题变少了


e847b1d41e364d53ba45b09e638b3901.png


番外


当我在执行命令brew tap homebrew/core时,又出现了问题,但好在问题后面有解决方法:


8db60b278daf42a185f47f271c7bc898.png


目录
相关文章
|
1月前
|
开发工具 git iOS开发
Mac 安装软件包管理工具Homebrew
Mac 安装软件包管理工具Homebrew
|
3月前
|
存储 Shell
Mac终端工具Terminal (3):在Mac上的终端中执行命令和运行工具
Mac终端工具Terminal (3):在Mac上的终端中执行命令和运行工具
|
2月前
|
Shell 网络安全 iOS开发
最好用的SSH工具Royal TSX for mac使用教程
众所周知,在 Windows上我们经常用到的shell工具可能非 xshell莫属了。但是xshell却并没有开发mac 版本,我们只能用其他的工具替代了。 在我用过几个ssh工具之后,我觉得在macOS上最好用的ssh工具客户端必须是 Royal TSX,它和使用xhell的感觉简直一模一样。 Royal TSX是一款功能非常强大适用于 Mac 的远程连接管理工具。兼容多种连接类型,比如:RDP、VNC、基于SSH连接的终端,SFTP/FTP/SCP或基于Web的连接管理,Royal TSX 都可以满足您的要求!
190 0
最好用的SSH工具Royal TSX for mac使用教程
|
1月前
|
开发工具 git
Git -- 代码上传错误 error: failed to push some refs to ‘git@gitee.com:JMFive/uni-shop2.git‘
Git -- 代码上传错误 error: failed to push some refs to ‘git@gitee.com:JMFive/uni-shop2.git‘
|
2月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
20 0
|
1月前
|
人工智能 Rust 运维
这一款 Mac 系统终端工具,已经用的爱不释手了!
这一款 Mac 系统终端工具,已经用的爱不释手了!
|
1月前
|
存储
【工具】Raycast 提效工具Mac
以前看到同事们锁屏的时候,不知按了什么键,直接调出这个框,然后输入lock屏幕就锁了。 我习惯的按Mac开机键不大一样。个人觉得还是蛮炫酷的~
32 0
|
1月前
|
Shell 网络安全 开发工具
mac或windows下的git环境配置
mac或windows下的git环境配置
41 0
|
1月前
|
存储 JavaScript 开发工具
Windows 10环境下Git安装之简易指南
该指南教小白在Windows 10上安装Git,介绍Git设置的基础知识,为你的开发项目做准备!
|
2月前
|
Linux 开发工具 git
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github