zoukankan      html  css  js  c++  java
  • Mac 安装 Homebrew

    为什么要在 MAC 上安装 Homebrew 它干什么用的呢?我们知道在 CentOS 和 Ubuntu 上都有自己的包管理工具,但是在 MAC 上却没有这样类似的管理工具。

    # CentOS
    $ yum -y install wget 
    # Ubuntu
    $ apt-get install wget
    

    Homebrew 是 MAC 下一款开源的软件包管理工具,它是由马克斯·霍威尔(Max Howell)用 Ruby 写成,Homebrew 基于 Github 为我们安装所需的软件包。很方便的实现其他平台的软件包管理。

    安装方法

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

    使用一条命令就可以把 Homebrew 安装到 mac 上是不是很简单啊。来让我们试试安装一个 wget 把

    # 安装 
    ~ brew install wget 
    # 测试一下
    ~ wget -V
    GNU Wget 1.20.3 在 darwin19.0.0 上编译。
    

    其他命令

    • 软件包搜索

      ~ brew search wget
      # 因为上面我们已经安装过所以包名前面有个对勾
      ==> Formulae
      wget ✔                                  wgetpaste
      
    • 软件包详情

      ~  brew info wget
      wget: stable 1.20.3 (bottled), HEAD
      Internet file retriever
      
    • 更新操作 brew update

    • 查看安装了什么包

      # 查询所有安装的包
      ~ brew list
      wget
      # 查询 wget 准确的安装位置
      ~ brew list wget
      /usr/local/Cellar/wget/1.20.3_1/.bottle/etc/wgetrc
      /usr/local/Cellar/wget/1.20.3_1/bin/wget
      /usr/local/Cellar/wget/1.20.3_1/share/info/wget.info
      /usr/local/Cellar/wget/1.20.3_1/share/locale/ (39 files)
      /usr/local/Cellar/wget/1.20.3_1/share/man/man1/wget.1
      
    • 更新某个包

      ~ brew upgrade wget
      
    • 卸载包操作

      ~ brew uninstall wget 
      Uninstalling /usr/local/Cellar/wget/1.20.3_1... (50 files, 4.0MB)
      
  • 相关阅读:
    javascript取最小值方法 apply
    c# 通过字符串获取与字符串同名的变量的值
    访问者地图 地址收藏
    自定义Dialog(一)
    android应用多主题
    maven setting 文件
    手动安装cloudera cdh4.2 hadoop + hbase + hive(三)
    手动安装cloudera cdh4.2 hadoop + hbase + hive(一)
    使用Hive读取Hbase中的数据
    手机共享电脑网络
  • 原文地址:https://www.cnblogs.com/l5gw/p/11893373.html
Copyright © 2011-2022 走看看