command line 노트

git에 push할 때 dyld: Library not loaded가 뜬다면

Jonchann 2020. 2. 17. 02:26

작년 말에 논문 쓴다고 실험 끝난 코드를 commit 상태에서 방치하다 발표도 끝나고 해서 push하려 하니

 

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/.../git-core/git-remote-https
  Reason: image not found

 

가 뜨면서 push failed 해버렸다..

stack overflow에서 열심히 뒤져보니 brew update를 해보라길래 해봤다.

 

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/.../git-core/git-remote-https
  Reason: image not found
  dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/.../git-core/git-remote-https
  Reason: image not found
  dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/.../git-core/git-remote-https
  Reason: image not found
  dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/.../git-core/git-remote-https
  Reason: image not found
  Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!
Fetching /usr/local/Homebrew failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!

 

이런..

결국 많은 답변들 중에 도움이 됐던 건 X code를 업그레이드 하는 것과 brew를 강제 reinstall하는 것이었다.

 

brew reinstall --force-bottle git
==> Reinstalling git
==> Installing dependencies for git: pcre2
==> Installing git dependency: pcre2
==> Downloading https://homebrew.bintray.com/bottles/pcre2-10.34.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/af/af3bf030a455daf0a560f8d9e433f7a803d7150933895699f311d661c33b9729?__gda__=exp=1581873638~hmac=2e3f455d6e9651633a1a99bd5e375f3cf5fae84619cbb334ec0021ba1722
######################################################################## 100.0%
==> Pouring pcre2-10.34.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/pcre2/10.34: 230 files, 5.9MB
==> Installing git
==> Downloading https://homebrew.bintray.com/bottles/git-2.24.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/27/2779f9cea861ef4d906093ac7b7255b3eeb7b6f76cbbc8407035bd3d3b80305d?__gda__=exp=1581873641~hmac=c48b7607ff689194845fa53acc7b0ec84e468fb727c9e3591a8cec59e597
######################################################################## 100.0%
==> Pouring git-2.24.1.catalina.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
==> Summary
🍺  /usr/local/Cellar/git/2.24.1: 1,558 files, 45.5MB
Removing: /Users/Library/Caches/Homebrew/git--2.20.0.tar.xz... (5.1MB)
Removing: /Users/Library/Caches/Homebrew/git--html--2.20.0.tar.xz... (1.2MB)
Removing: /Users/Library/Caches/Homebrew/git--man--2.20.0.tar.xz... (428.9KB)
==> Caveats
==> git
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git

 

push도 무사히 성공했다.