mac 开发环境采坑

homebrew

替换homebrew默认源

cd "$(brew --repo)"
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

替换homebrew-core源

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git

Mac下使用国内镜像安装Homebrew

使用brew install dart安装东西时,提示Xcode outdated

brew install dart
==> Installing dart from dart-lang/dart
Error: Your Xcode (10.0) is too outdated.
Please update to Xcode 10.2.1 (or delete it).
Xcode can be updated from the App Store.

解决方法
打开文件 /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb
删除此行代码check_xcode_minimum_version

      def fatal_build_from_source_checks
        %w[
          check_xcode_license_approved
        - check_xcode_minimum_version
          check_clt_minimum_version
          check_if_xcode_needs_clt_installed
        ].freeze
      end

Dart环境搭建

安装Dartsdk https://dart.dev/get-dart

安装brew https://brew.sh/

brew tap dart-lang/dart

brew install dart

Vscode 安装插件[Dart、Code Runner]

posted @ 2019-09-01 01:37  hid3onbush  阅读(1165)  评论(0编辑  收藏  举报