2016-12-11 5 views
-1

Macを使用しています。私は現在、私はそれがこれらのstepsに従うことで、最新バージョンですへのNode.jsを更新したいのNode.js 4.4.3Update Node.js:MacでNode.jsを更新中にエラーが発生しました

Aleeshas-MacBook-Air:~ aleesha$ node -v 
v4.4.3 

をインストールしました。

まず、私は実行しようとしました:brew update。しかし、私はコマンドを実行したとき、私は以下のエラーを取得しました。

brew update Error: /usr/local is not writable. You should change the ownership and permissions of /usr/local back to your user account: sudo chown -R $(whoami) /usr/local

だから、Googleで解決策を探した後、私は、このコマンドを実行した:sudo chown -R $(whoami) /usr/local

私は再びbrew updateコマンドを実行した後。エラーメッセージが表示されなかったので、正常に実行されたと思います。コマンドプロンプトの最後の数行は、次のとおりです。

==> Migrating HOMEBREW_REPOSITORY (please wait)... ==> 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 Aleeshas-MacBook-Air:~ aleesha$

ただし、この手順を実行してアップグレードコマンドを実行すると、失敗しました。

ここで正確に何が行われる必要があるのか​​よくわかりません。

おかげ

EDIT:システムの異常をチェックするためにbrew doctorを実行しました。

Aleeshas-MacBook-Air:~ aleesha$ brew doctor 
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 and just ignore them. 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: 
    /Library/Frameworks/Python.framework/Versions/3.5/bin/python3-config 
    /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config 
    /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config 

Warning: No developer tools installed. 
Install the Command Line Tools: 
    xcode-select --install 


Warning: Python is installed at /Library/Frameworks/Python.framework 

Homebrew only supports building against the System-provided Python or a 
brewed Python. In particular, Pythons installed to /Library can interfere 
with other software installs. 

Warning: Unbrewed header files were found in /usr/local/include. 
If you didn't put them there on purpose they could cause problems when 
building Homebrew formulae, and may need to be deleted. 

Unexpected header files: 
    /usr/local/include/node/android-ifaddrs.h 
    /usr/local/include/node/ares.h 
    /usr/local/include/node/ares_version.h 
    /usr/local/include/node/libplatform/libplatform.h 
    /usr/local/include/node/nameser.h 
    /usr/local/include/node/node.h 
    /usr/local/include/node/node_buffer.h 
+0

あなたはノードがインストールされていません。ノードがインストールされていますか? – Rishav

+0

はい、バージョン: 'v4.4.3' –

答えて

2

Homebrewを使用してノードをインストールしていない場合は、this gistを使用して現在のノードのインストールをアンインストールします。

そして:それは言う

brew update && brew install node 
+0

ありがとう私はアンインストールして、ノードを最新のバージョンに再インストールしなければならなかった –

+0

私のために同じ;私の[procdeure](https://stackoverflow.com/questions/47125042/webdriverjs-createsession-args-error/47125235#47125235) – user1207289

0

brewを通じてnodejをインストールしなかったようです。 brewを使用せずにNodeをインストールした場合、brewはそれを認識しません。ノードのバージョンマネージャでノードをインストールしたことを認識するまで、私は同じ問題を抱えていました。 Brewを使用してインストールしていることを確認してください。

brew list 

インストールされているものが表示されます。

+0

ありがとうございました。助けてくれてありがとう。 –

+0

良いそれはあなたを助けました –

関連する問題