mac에 brew, node 설치

2234 단어
최근에 컴퓨터 한 대를 새로 조립하여 총결산을 하였다.
brew 설치
1. brew 설치
$ curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1

2, 설치 완료 후 실행
$ brew

프롬프트 Please run brew update!
3. 프롬프트에 따라 업데이트, 실행
$ brew update

오류: Error:/usr/local must be writable!
4./usr/local 디렉터리에 권한을 부여하고 실행
$ sudo chown -R $(whoami) /usr/local

5. 재집행
$ brew update

팁:
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0

HEAD is now at c3f959d Merge pull request #1542 from woodruffw/deprecate-utils-json

To restore the stashed changes to /usr/local run:

  'cd /usr/local && Git stash pop'

==> Homebrew has enabled anonymous aggregate user behaviour analytics

Read the analytics documentation (and how to opt-out) here:

  https://git.io/brew-analytics

==> Tapping homebrew/core

Cloning into '/usr/local/Library/Taps/homebrew/homebrew-core'...

remote: Counting objects: 3757, done.

remote: Compressing objects: 100% (3647/3647), done.

remote: Total 3757 (delta 13), reused 305 (delta 1), pack-reused 0

Receiving objects: 100% (3757/3757), 3.00 MiB | 30.00 KiB/s, done.

Resolving deltas: 100% (13/13), done.

Checking connectivity... done.

Tapped 3636 formulae (3,784 files, 9.3M)

Already up-to-date.

Error: Could not link:

/usr/local/share/doc/homebrew


Please delete these paths and run `brew update`.

==> Migrating HOMEBREW_REPOSITORY (please wait)...

Error: Could not link:

/usr/local/share/doc/homebrew


Please delete these paths and run `brew update`.

==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew!

Homebrew no longer needs to have ownership of /usr/local. If you wish you can

return /usr/local to its default ownership with:

  sudo chown root:wheel /usr/local

6、프롬프트에 따라/usr/local/share/doc/homebrew 삭제, 실행
$ rm -r -f /usr/local/share/doc/homebrew

7. 재집행
$ brew update

설치가 성공했습니다.
2. node 설치
$ brew install node

node 자체 npm, npm가 있으면 아주 happy, make youself happy.

좋은 웹페이지 즐겨찾기