MacOS brew update 升级系统时出现 pkg-config.rb:1: syntax error, unexpected 错误 解决办法

问题描述

在MacOS升级系统中使用 brew update 命令升级软件时出现 pkg-config.rb:1: syntax error, unexpected 错误

brew upgrade
==> Upgrading 18 outdated packages:
fribidi 1.0.7 -> 1.0.9
gcc 9.2.0_1 -> 9.3.0
glib 2.62.3 -> 2.64.1
gmp 6.1.2_2 -> 6.2.0
go 1.13.4 -> 1.14
isl 0.21 -> 0.22.1
libidn2 2.2.0_1 -> 2.3.0
make 4.2.1_1 -> 4.3
meson 0.52.0 -> 0.53.2
ncurses 6.1 -> 6.2
ninja 1.9.0 -> 1.10.0
pcre 8.43 -> 8.44
python 3.7.5 -> 3.7.7
readline 8.0.1 -> 8.0.4
sqlite 3.30.1 -> 3.31.1
telnet 60 -> 63
xz 5.2.4 -> 5.2.5
zsh 5.7.1 -> 5.8
Error: pkg-config: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb:1: syntax error, unexpected <<
<<<<<<< HEAD
^~
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb:40: syntax error, unexpected ===, expecting end-of-input
^~~

解决方案

rm -rf /usr/local/Homebrew/.git
brew update
brew config

链接到文章: https://ixvps.com/46680.html

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注