Nice programing

Mac OS Sierra에서 Brew로 노드 설치 실패

nicepro 2020. 10. 8. 18:57
반응형

Mac OS Sierra에서 Brew로 노드 설치 실패


macOS Sierra에 homebrew로 노드를 설치하려고합니다. 난 달린다

 brew install node

겉보기에 성공적인 설치 후 실행하려고 할 때 다음과 같은 메시지가 나타납니다 node.

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib
  Referenced from: /usr/local/bin/node
  Reason: image not found
Abort trap: 6

이것은 @robertklep 및 @vovkasm 제안한 링크를 기반으로 결국 저에게 효과가 있었던 일련의 주문입니다 .

brew uninstall --force node
brew uninstall icu4c && brew install icu4c
brew unlink icu4c && brew link icu4c --force
brew install node

모두 필요한지 확실하지 않지만 이전 상태에서 내 컴퓨터를 가져올 수 없다는 점을 감안할 때이 정보를 여기에 남겨 두겠습니다. 다른 사람에게 유용 할 수 있습니다.


제 경우에는 brew upgrade node문제를 해결하십시오. :)


글쎄, 나는이 오류를 설치하려고 시도 @angular/cli했지만 노드가 오래되었을 수 있음을 깨달았습니다. @mircealungu의 정확한 단계를 따르는 것은 저에게 효과적이지 않았습니다. 여기 저에게 효과가있는 수정 된 버전이 있습니다.

brew uninstall --ignore-dependencies --force node
brew uninstall --ignore-dependencies --force icu4c
brew install icu4c
brew unlink icu4c && brew link icu4c --force
brew install node

노드를 업그레이드하면 문제가 해결되었습니다.

brew upgrade node 

최근에 비슷한 문제가 발생했습니다 ( brew switch node 9.8.0이전 버전의 노드로 다운 그레이드 한 후 ).

dyld: Library not loaded: 
/usr/local/opt/icu4c/lib/libicui18n.60.dylib
  Referenced from: /usr/local/bin/node
  Reason: image not found
Abort trap: 6

문제는 노드가 찾고있는 icu4c 버전에 대해 까다 롭고 내가 설치 한 버전 (62)이 노드가 예상했던 것보다 높았다는 것입니다.

수정하기 위해 icu4c 버전 60을 선택했는지 확인했습니다.

먼저 내가 가지고있는 버전을 찾은 brew info icu4c다음 brew switch icu4c 60.2예상하는 노드 하나를 선택했습니다.


/usr/local/opt/icu4c/lib/libicui18n.58.dylib시스템에 파일 이없는 것 같습니다 .

icu4cHomebrew와 함께 설치 되었는지 확인하십시오 .

  1. brew info icu4c
  2. 이미 설치된 경우 다시 설치하십시오. brew reinstall icu4c
  3. 설치되지 않은 경우 설치를 시도하십시오. brew install icu4c

먼저 노드와 icu4c를 제거하고 모든 버전을 강제로 제거합니다.

brew uninstall --force --ignore-dependencies node icu4c

Node 버전 8을 설치 한 후

brew install node@8

이미 설치되어 있다면 업그레이드 만하십시오

brew upgrade node@8

그리고 입력

node -v

v8.11.1


높은 세이라의 경우 "브루 업그레이드"만으로도 마법이 만들어집니다!


이것은 나를 위해 트리거 brew upgrade되고 brew update실행되었습니다. 문제로 표시된 두 항목을 간단히 다시 설치하여 문제를 해결할 수있었습니다.

brew reinstall node
brew reinstall icu4c

위의 어느 것도 나를 위해 일하지 않았습니다. 저는 High Sierra를 사용하고 있습니다.

나를 위해 고친 것은 brew upgrade


나를 위해 일한 것은 없지만 이것을 실행하면 효과적이었습니다

brew link --overwrite node

여기에서 잘 작동하는 솔루션을 찾았 습니다 . 아래에 간단히 명령을 내리겠습니다.

먼저 homebrew 공식 디렉토리로 이동하십시오.

cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula

힘내 로그 :

git log --follow icu4c.rb

필요한 버전과 일치하는 커밋 해시를 선택합니다. 버전 61.1이 필요했기 때문에 6d9815커밋 을 선택했습니다 .

git checkout -b icu4c-61.1 6d9815

재설치 :

brew reinstall ./icu4c.rb

스위치:

brew switch icu4c 61.1

그것은 나를 위해 그것을 고쳤습니다.

크레딧 : hanxue


brew uninstall --force node
brew uninstall --ignore-dependencies icu4c
brew unlink icu4c && brew link icu4c --force
brew install node


이 오류는 컴퓨터를 마이그레이션 한 후 나에게 주어졌습니다.

모든 것이 설치되어 있어도 확인하러 node -v가거나npm version, I'd get this error.

수정 사항 brew reinstall icu4c.


내 로컬 PHP 설치와 동일한 문제가 발생했습니다.

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
Abort trap: 6

Solved the problem with this command. (check your version)

brew link --overwrite --force php@7.1

it seems like your icu4u Reference path is not set properly

first check you might instal icu4c or not by putting below comment in comment promt

brew info icu4c

or else reinstall

brew reinstall icu4c

If you need to have this software first in your PATH run:

echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile

hope This might help !!!!!


It's as easy as a common software, just download installation package from official site:NodeJS

and then download a recommended version(currently 8.11.3, end with .pkg), install it as a common software, then u can use it. I tried so many methods, and only this works for me.


I removed export PATH="/usr/local/opt/icu4c/bin:$PATH" from my ~/.bash_profile file and it fixed my problem.

My error was:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
  Referenced from: /usr/local/opt/node@10/bin/node
  Reason: image not found
Abort trap: 6

My /usr/local/opt/icu4c/lib contains libicui18n.64.dylib


For me it was apparently a problem with the icu4c installation from brew.

brew reinstall icu4c

will reinstall icu4c.

if you don't have it installed,

brew install icu4c

Try restarting your machine. That helped me.

참고URL : https://stackoverflow.com/questions/43780207/installing-node-with-brew-fails-on-mac-os-sierra

반응형