Py学习  »  Git

Git不在Mac上的自制程序路径中

Robert Lawrence • 4 年前 • 855 次点击  

几天前,我跑了 brew update ,尝试在我的Mac上更新自制程序(我使用OSX 10.9.5)。当我运行这个时,我得到了这个

dyld: Library not loaded: /usr/local/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /usr/local/opt/git/bin/git
  Reason: image not found
/usr/local/Homebrew/Library/Homebrew/brew.sh: line 193: 25509 Trace/BPT trap: 5       "$HOMEBREW_PREFIX/opt/git/bin/git" --version > /dev/null
dyld: Library not loaded: /usr/local/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /usr/local/opt/git/bin/git
  Reason: image not found
/usr/local/Homebrew/Library/Homebrew/brew.sh: line 193: 25615 Trace/BPT trap: 5       "$HOMEBREW_PREFIX/opt/git/bin/git" --version > /dev/null
Warning: curl 7.63.0 is already installed, it's just not linked
You can use `brew link curl` to link this version.
dyld: Library not loaded: /usr/local/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /usr/local/opt/git/bin/git
  Reason: image not found
/usr/local/Homebrew/Library/Homebrew/brew.sh: line 193: 25750 Trace/BPT trap: 5       "$HOMEBREW_PREFIX/opt/git/bin/git" --version > /dev/null
Warning: git 2.20.1 is already installed and up-to-date
To reinstall 2.20.1, run `brew reinstall git`
Error: Git must be installed and in your PATH!

我还跑去看酿酒医生,看有没有什么变化。这就是结果。

dyld: Library not loaded: /usr/local/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /usr/local/opt/git/bin/git
  Reason: image not found
/usr/local/Homebrew/Library/Homebrew/brew.sh: line 193: 25891 Trace/BPT trap: 5       "$HOMEBREW_PREFIX/opt/git/bin/git" --version > /dev/null
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: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /Users/Robby/anaconda2/bin/curl-config
  /Users/Robby/anaconda2/bin/freetype-config
  /Users/Robby/anaconda2/bin/icu-config
  /Users/Robby/anaconda2/bin/krb5-config
  /Users/Robby/anaconda2/bin/libpng-config
  /Users/Robby/anaconda2/bin/libpng16-config
  /Users/Robby/anaconda2/bin/ncursesw6-config
  /Users/Robby/anaconda2/bin/pcre-config
  /Users/Robby/anaconda2/bin/python-config
  /Users/Robby/anaconda2/bin/python2-config
  /Users/Robby/anaconda2/bin/python2.7-config
  /Users/Robby/anaconda2/bin/xml2-config
  /Users/Robby/anaconda2/bin/xslt-config

Warning: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
  brew install git

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  autoconf
  automake
  bash-completion
  brotli
  c-ares
  cask
  cmake
  cunit
  docbook
  docbook-xsl
  doxygen
  emacs
  fontconfig
  freetype
  gdbm
  geoip
  gmp
  gnutls
  htop
  itstool
  jansson
  jemalloc
  jpeg
  libev
  libevent
  libpng
  libtasn1
  libtool
  libunistring
  nettle
  nmap
  p11-kit
  pcre2
  pkg-config
  python@2
  watch

Warning: You are using macOS 10.9.
We (and Apple) do not provide support for this old version.
You may encounter build failures and other breakages.
Please create pull requests instead of asking for help on
Homebrew's GitHub, Discourse, Twitter or IRC. You are
responsible for resolving any issues you experience, as
you are running this old version.


Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
  brew install python

Run `brew missing` for more details.

这就是我跑步时想到的 brew missing .

dyld: Library not loaded: /usr/local/opt/pcre2/lib/libpcre2-8.0.dylib
  Referenced from: /usr/local/opt/git/bin/git
  Reason: image not found
/usr/local/Homebrew/Library/Homebrew/brew.sh: line 193: 26131 Trace/BPT trap: 5       "$HOMEBREW_PREFIX/opt/git/bin/git" --version > /dev/null
itstool: python
libxml2: python

有什么想法吗?我被难住了。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/52526
 
855 次点击  
文章 [ 2 ]  |  最新文章 4 年前
Robert Lawrence
Reply   •   1 楼
Robert Lawrence    5 年前

当我执行brew重新安装git&brew unlink git&brew link git时,会出现这种情况。

dyld:库未加载:usr/local/opt/pcre2/lib/libpcre2-8.0.dylib 引用自:/usr/local/opt/git/bin/git 原因:找不到图像 /usr/local/Homebrew/Library/Homebrew/brew.sh:第193行:27683 Trace/BPT trap:5“$Homebrew_PREFIX/opt/git/bin/git”--version>/dev/null ==>重新安装git 错误:子进程中发生异常: 运行时错误:usr/local/opt/pcre2不存在或已损坏 请重新安装pcre2。对不起:(

这是在我进行brew升级git时出现的。

dyld:库未加载:usr/local/opt/pcre2/lib/libpcre2-8.0.dylib 引用自:/usr/local/opt/git/bin/git 原因:找不到图像 /usr/local/Homebrew/Library/Homebrew/brew.sh:第193行:27868 Trace/BPT trap:5“$Homebrew_PREFIX/opt/git/bin/git”--version>/dev/null dyld:库未加载:usr/local/opt/pcre2/lib/libpcre2-8.0.dylib 引用自:/usr/local/opt/git/bin/git 原因:找不到图像 /usr/local/Homebrew/Library/Homebrew/brew.sh:第193行:27978 Trace/BPT trap:5“$Homebrew_PREFIX/opt/git/bin/git”--version>/dev/null dyld:库未加载:usr/local/opt/pcre2/lib/libpcre2-8.0.dylib 引用自:/usr/local/opt/git/bin/git 原因:找不到图像 /usr/local/Homebrew/Library/Homebrew/brew.sh:第193行:28084 Trace/BPT trap:5“$Homebrew_PREFIX/opt/git/bin/git”--version>/dev/null 警告:curl 7.63.0已经安装,只是没有链接 你可以用 brew link curl 链接此版本。 dyld:库未加载:usr/local/opt/pcre2/lib/libpcre2-8.0.dylib 引用自:/usr/local/opt/git/bin/git 原因:找不到图像 /usr/local/Homebrew/Library/Homebrew/brew.sh:line 193:28219 Trace/BPT trap:5“$Homebrew_PREFIX/opt/git/bin/git”--version>/dev/null 正在更新自制。。。 警告:git 2.20.1已经安装并且是最新的 要重新安装2.20.1,请运行 brew reinstall git 错误:必须在您的路径中安装Git! dyld:库未加载:usr/local/opt/pcre2/lib/libpcre2-8.0.dylib 引用自:/usr/local/opt/git/bin/git 原因:找不到图像 /usr/local/Homebrew/Library/Homebrew/brew.sh:line 193:28353 Trace/BPT trap:5“$Homebrew_PREFIX/opt/git/bin/git”--version>/dev/null 错误:git 2.20.1已安装

Yoric
Reply   •   2 楼
Yoric    5 年前

你试过下列方法吗(如 brew 在输出文本中):

brew reinstall git

或:

brew reinstall git && brew unlink git && brew link git

或:

brew upgrade git