搜索

首页  >  问答  >  正文

node.js - mac终端安装node时候,显示“-bash: brew: command not found”,怎么解决?

mac终端安装node时候,显示“-bash: brew: command not found”,怎么解决?

ringa_leeringa_lee2865 天前883

全部回复(3)我来回复

  • PHP中文网

    PHP中文网2017-04-17 13:15:48

    先安装brew

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    回复
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:15:48

    没安装 Homebrew

    bash 下执行 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    回复
    0
  • PHP中文网

    PHP中文网2017-04-17 13:15:48

    如果出现 brew not found :

    sudo find / -name brew # 查看是否存在 brew, 如果不存在就删除下述两个文件
    rm -rf /usr/local/Cellar
    rm -rf /usr/local/.git

    然后重新安装 brew 就 ok 了

    回复
    0
  • 取消回复