簡體   English   中英

使用自制程序問題安裝Node.js.

[英]Installing Node.js with homebrew issue

我正在嘗試在OS X上安裝帶有自制程序的Node.js,但是我遇到了一些問題而且我不太確定如何修復它們。 當我運行brew doctor我得到以下輸出:

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: 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:

    node

Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
    cd /usr/local/Library && git stash && git clean -d -f
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (5.1). Please `brew update` and if that doesn't help, file
an issue with the output of `brew --config`:
  https://github.com/Homebrew/homebrew/issues

Note that we only track stable, released versions of Xcode.

Thanks!

我試圖運行brew link node並得到以下消息:

Linking /usr/local/Cellar/node/0.10.26... Warning: Could not link node. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/node/0.10.26/lib/dtrace/node.d
Target /usr/local/lib/dtrace/node.d already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
  brew link --overwrite formula_name

To list all files that would be deleted:
  brew link --overwrite --dry-run formula_name

所以然后我嘗試運行brew link --overwrite node並得到以下錯誤:

Linking /usr/local/Cellar/node/0.10.26... Warning: Could not link node. Unlinking...

Error: Permission denied - /usr/local/lib/dtrace/node.d

我現在卡住了,不知道該怎么做。 任何幫助將不勝感激。

我通過運行解決了這個問題:

sudo chown -R `whoami` /usr/local

要解決權限問題,請嘗試

sudo brew link --overwrite node

請注意,除非您有特定的理由使用自制軟件安裝節點,否則我建議您只需訪問http://nodejs.org/ ,下載Mac OS安裝程序並讓它為您完成所有操作。

我有點遲到了,但是我遇到了同樣的問題 - 我想我已經做了一些事情。

通過運行ls -al /usr/local/lib/dtrace/node.d檢查您對/usr/local/lib/dtrace/node.d的權限。 如果所有者是您的用戶名以外的其他人,請通過運行來修復該問題

sudo chown -R $USER:staff /usr/local/lib/dtrace/node.d

這應該為您提供繼續操作所需的權限。 在那之后,我點擊了幾個擁有所有者列為nobody目錄(我實際上最終知道所有/ usr / local / Cellar,我會等待評論,看看有多糟糕的想法)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM