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

如果安装成功的话,还出现这个问题说明可能是没有配置相关环境变量,那么如何配呢?

我们可以在/usr/local/bin目录下找找是否已经安装了相应命令

ok,我们可以看到brew命令是有的,那么我们只需要把这个命令的路径配置到系统环境变量即可。

sudo vim /etc/profile

文件底部加入

PATH=".;$PATH:/usr/local/bin"

PATH路径是通过“:"进行分割的,在后面添加/usr/local/bin,然后重新打开命令行,就可以使用brew命令。

-bash: brew: command not found的更多相关文章

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

    原文网址:https://segmentfault.com/q/1010000004221389/a-1020000004221408 mac终端安装node时候,显示“-bash: brew: co ...

  2. 解决mac安装homebrew后报错-bash: brew: command not found

    解决mac安装homebrew后报错-bash: brew: command not found     参照官网上很简单的一句安装命令, /usr/bin/ruby -e "$(curl ...

  3. Mac系统下安装Homebrew后无法使用brew命令,-bash: brew: command not found

    使用如下命令: sudo vim .bash_profile 然后输入以下代码: export PATH=/usr/local/bin:$PATH 再使用以下命令使配置生效: source .bash ...

  4. mac--“-bash: brew: command not found”,怎么解决?

    报错 “-bash: brew: command not found” 执行下面命令,安装HomeBrew ruby -e "$(curl -fsSL https://raw.githubu ...

  5. scp报错 -bash: scp: command not found

    环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...

  6. source /etc/profile报错-bash: id:command is not found

    由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...

  7. -bash: .bash_profile: command not found

    今天有一同事安装了ORACLE后,在切换账号时遇到错误提示"-bash: .bash_profile: command not found".如下所示 [root@GLETestL ...

  8. Linux下提示 bash: xxx command not found

    今天在虚拟机上安装了CentOS5.5,发现运行一些很正常的诸如:init,shutdown,fdisk 等命令时,悍然提示: bash: xxx command not found. 那么,首先就要 ...

  9. [原创]-bash: iostat: command not found解决办法

    [root@testhost ~]# iostat-bash: iostat: command not found IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括i ...

随机推荐

  1. ElasticSearch排序Java api简单Demo

    代码: String time1 = ConstValue.GetCurrentDate(); SortBuilder sortBuilder = SortBuilders.fieldSort(&qu ...

  2. PAT 1068 Find More Coins[dp][难]

    1068 Find More Coins (30)(30 分) Eva loves to collect coins from all over the universe, including som ...

  3. yii2redis安装

    yii2 – redis 配置 转自:http://www.fancyecommerce.com/2016/05/03/yii2-redis-%E9%85%8D%E7%BD%AE/ 安装redis w ...

  4. zw版【转发·台湾nvp系列Delphi例程】HALCON FastThreshold1

    zw版[转发·台湾nvp系列Delphi例程]HALCON FastThreshold1 procedure TForm1.Button1Click(Sender: TObject);var img ...

  5. 数据仓库基础(十二)Informatica组件(2)

    本文转载自:http://www.cnblogs.com/evencao/p/3152708.html 1.Router Transformation:在filter 组件中只能写一个过滤条件.而在R ...

  6. linux常用命令:yum 命令

    用于添加/删除/更新RPM包,自动解决包的依赖问题以及系统更新升级. 1.命令格式:    yum  [参数] [软件名]2.命令功能:    功能:  yum提供了查找.安装.删除某一个.一组甚至全 ...

  7. python练习题,写一个方法 传进去列表和预期的value 求出所有变量得取值可能性(例如list为[1,2,3,4,5,6,12,19],value为20,结果是19+1==20只有一种可能性),要求时间复杂度为O(n)

    题目:(来自光荣之路老师)a+b==valuea+b+c=valuea+b+c+d==valuea+b+c+d+...=valuea和b....取值范围都在0-value写一个方法 传进去列表和预期得 ...

  8. Linux服务器---DansGuardian

    DansGuardian DansGuardian可以限制客户端的访问,通过这个软件,我们可以限制哪些网站不可以访问.哪些内容不能下载. 1.下载DansGuardian,提供一个网址http://w ...

  9. php 写内容到文件,把日志写到log文件

    php 写内容到文件,把日志写到log文件 <?php header("Content-type: text/html; charset=utf-8"); /******** ...

  10. idea生成springboot jpa的实体对象

    在idea的database里面添加上数据库 File-->Project Structure Modules--->点击加号----->选择JPA  选择确认之后再主面板上就会出现 ...