mac development environment Pit

homebrew

Replace the default source homebrew

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

Alternatively homebrew-core source

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

Use a mirror to install Homebrew under domestic Mac

Use brew install dartwhen installing things, prompted 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.

Workaround
Open the file /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb
to remove this line of codecheck_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 environment to build

Installation Dartsdk https://dart.dev/get-dart

Installation BREW https://brew.sh/

brew tap dart-lang/dart

brew install dart

Vscode install the plug [Dart, Code Runner]

Guess you like

Origin www.cnblogs.com/hideonbush/p/11441259.html