Tôi đang cố gắng cài đặt node.js qua Homebrew. Thật không may, tôi nhận được lỗi này:
➜ ~ brew install node
==> Downloading http://nodejs.org/dist/v0.8.10/node-v0.8.10.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/node/0.8.10
==> make install
==> Caveats
Homebrew installed npm.
We recommend prepending the following path to your PATH environment
variable to have npm-installed binaries picked up:
/usr/local/share/npm/bin
Warning: Could not link node. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link node'
==> Summary
/usr/local/Cellar/node/0.8.10: 856 files, 13M, built in 103 seconds
Vì vậy, sau đó tôi cố gắng liên kết nút thủ công ...
➜ ~ brew link node
Linking /usr/local/Cellar/node/0.8.10... Warning: Could not link node. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/node/0.8.10/lib/node_modules/npm/scripts/relocate.sh
Target /usr/local/lib/node_modules/npm/scripts/relocate.sh already exists. You may need to delete it.
To force the link and delete this file, do:
brew link -f formula_name
To list all files that would be deleted:
brew link -n formula_name
Không có may mắn, vì vậy tôi cố gắng liên kết nút mạnh mẽ ...
➜ ~ brew link -f node
Linking /usr/local/Cellar/node/0.8.10... Warning: Could not link node. Unlinking...
Error: Permission denied - /usr/local/lib/dtrace/node.d
Tôi không quen thuộc với dtrace trong bất kỳ vấn đề nào và tôi sợ làm hỏng các quyền, vì vậy tôi đã cố gắng sudo ..
➜ ~ git:(master) sudo brew link -f node
Password:
Error: Cowardly refusing to `sudo brew link'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
Tôi đã thử gỡ cài đặt nút thông qua brew uninstall node
và thử lại cài đặt mà không gặp may.