VPS优选
    VPS优选
    • 首页
    • 国内云服务
      • 阿里云
      • 腾讯云
      • 华为云
      • 天翼云
    • VPS优惠
      • 美国VPS
      • 香港VPS
      • 日本VPS
    • 经验技巧
      • 支付
      • 工具
      • 域名
      • Linux
      • Mac
    • 网站主题
      • WordPress
      • Typecho
    • 开源代码
    VPS优选
    首页 » 经验技巧 » Mac » Homebrew 从 Intel 迁移到 Apple M1
    Mac

    Homebrew 从 Intel 迁移到 Apple M1

    2023年03月04日
    ## You can copy and paste into the Terminal
    
    ## Go to home directory
    cd ;
    
    ## Create list of installed Intel packages
    brew bundle dump ;
    
    ## Install new version of Homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ;
    
    ## Update the PATH to point to M1 version first
    eval "$(/opt/homebrew/bin/brew shellenv)" ;
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc ;
    
    ## Migrate Intel packages (/usr/local/bin/brew) to M1 (/opt/Homebrew)
    ## You may need to enter your sysadmin password
    brew bundle --file Brewfile ;
    
    ## Update packages
    brew update ; 
    
    ## Upgrade packages
    brew upgrade ;
    
    ## Clean up
    brew cleanup ;
    
    ## Uninstall old Intel version
    
    # Download uninstall script
    curl -fsSL -o ./uninstall.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh ;
    
    # Run the uninstall specifying the old path
    sudo /bin/bash ./uninstall.sh --path=/usr/local ;
    # Enter password
    # Type Y to uninstall
    
    # Delete uninstall script
    rm uninstall.sh ;
    
    # Final cleanup
    brew cleanup ;

     

    同时,可以设置别名,方便区分

    alias ibrew='arch -x86_64 /usr/local/bin/brew'
    alias mbrew='arch -arm64e /opt/homebrew/bin/brew'
    文章导航
    关于本站
    VPS优选

    精选内容
    更多>

    详细整理Cloudflare开通和设置SSL证书的功能

    2022年03月26日

    CloudFlare遇到Error 526无效的SSL证书解决方法

    2023年01月17日

    腾讯云新春采购大促:2核2G4M云服务器秒杀价首年40元,4核8G10M首年211元

    2022年03月09日
    今日热门信息
    更多>
    • #域名 详细整理Cloudflare开通和设置SSL证书的功能
    • #域名 申请CloudFlare免费15年的SSL证书
    • #Linux 解决Ubuntu系统升级问题
    • #Linux Linux一键重装支持Debian 12,迄今为止功能最全, ...
    • #工具 GOOGLE VOICE(GV)号码介绍及使用方法
    © 2023 VPS优选.
    • 联系我们
    • 返回首页

    按 回车 搜索. 按 Esc 取消.