在Mac OS上安装带有自制程序问题的节点 [英] Installing node with homebrew problems mac OS

查看:111
本文介绍了在Mac OS上安装带有自制程序问题的节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装自制软件后,

运行brew install node

我通过以下方式进行测试:

I test with:

node --version

我得到:

找不到命令

command not found

如果我重新运行安装命令: 我得到:

If I rerun the install command: I get:

MacBook-Pro:〜evanloiterman $ brew安装节点警告:节点10.9.0是 已经安装,只是没有链接.您可以使用brew link node 链接此版本. MacBook-Pro:〜evanloiterman $ brew链接节点 链接/usr/local/Cellar/node/10.9.0 ...错误:无法符号链接 include/node/common.gypi目标/usr/local/include/node/common.gypi 已经存在.您可能要删除它:rm '/usr/local/include/node/common.gypi'

MacBook-Pro:~ evanloiterman$ brew install node Warning: node 10.9.0 is already installed, it's just not linked You can use brew link node to link this version. MacBook-Pro:~ evanloiterman$ brew link node Linking /usr/local/Cellar/node/10.9.0... Error: Could not symlink include/node/common.gypi Target /usr/local/include/node/common.gypi already exists. You may want to remove it: rm '/usr/local/include/node/common.gypi'

我尝试brew link node

我得到:

错误:无法符号链接include/node/common.gypi目标 /usr/local/include/node/common.gypi已经存在.您可能要 删除它:rm'/usr/local/include/node/common.gypi'

Error: Could not symlink include/node/common.gypi Target /usr/local/include/node/common.gypi already exists. You may want to remove it: rm '/usr/local/include/node/common.gypi'

要强制链接并覆盖所有冲突的文件:brew链接 --overwrite节点

To force the link and overwrite all conflicting files: brew link --overwrite node

列出所有将要删除的文件:brew link --overwrite --dry-run节点

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

接下来我该怎么做才能确保它正常工作?

What should I try next to ensure this is working?

推荐答案

您应该安装NVM(节点版本管理器).使用此工具,您可以选择要使用和安装的节点.

You should install NVM (Node Version Manager). With this tool you can choose which node to use and install.

https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/

这篇关于在Mac OS上安装带有自制程序问题的节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆