M1

Problems with Homebrew installation:

Because Apple’s security mechanism does not allow direct script installation of Homnebrew, an error was reported on port 443.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Copy the code

Solution: Directly open the browser, save local, execute the command

Bash File name. ShCopy the code

Can be solved. If you encounter a breW-V error and cannot find the relevant command, it is usually the environment variable solution: commond+shift+. ZSHRC to create a reality hidden file.

Set the export PATH = / opt/homebrew/bin: $PATHCopy the code

Installing Node:

Installed homebrew, next is to install node. Js, same problem error 443. The homebrew installation path in/opt/homebrew/Library/Taps/homebrew, delete the homebrew – inside the core, and download again

git clone https://github.com/Homebrew/homebrew-core.git
Copy the code

Then run Brew Install Node

Problem installing cocoaPod

If you want to install cocoaPod, you will need to install Ruby first. You can use Ruby -v to view the current version of cocoaPod

ruby -v
gem sources
sudo gem update --system
gem sources --remove https://rubygems.org/
gem sources -a https://gems.ruby-china.com/

Copy the code

Install cocoaPod via gem

Sudo gem install cocoapods sudo gem install ffiCopy the code

Here’s the problem:

Solution: Check the introduction information about the terminal and select Rosetta. Then run cocoaPod again

What Rosetta is for: support.apple.com/en-us/HT211…