The premise

Get the company’s new computer, configure a wave

Hit the pit

  1. Ready to install Iterm heard awesome development with this. I can’t. I don’t know how to do it.
  2. I heard Iterm works better with Oh My Zsh. Ok, the next Oh My Zsh.
Book-Pro ~ % sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Cloning Oh My Zsh...
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Error: git clone of oh-my-zsh repo failed
Copy the code
  1. Error, failure, okay, let’s do it another way:
Book-Pro ~ % git clone https://github.com/ohmyzsh/ohmyzsh.git
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Copy the code
  1. Because there is no git on the computer, the picture is as follows:

5. No soft use, installation progress bar, etc. I spent thanks and will not drive. Stay at a third forever. Ok, then go search git installation:Git-scm.com/download/ma…

6. Found to install BREW, heard is also a good thing, powerful development are using. All right, that’s it. (Because I didn’t climb the wall, I had to use this. If you want to use the official website, you will need to use Xcode, but it is too big, pass!

The Book - Pro ~ % / bin/ZSH - c "$(curl - fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" began to implement the Brew automatic installation program [[email protected]] [' 2021-04-20 17:05:17] [' 10.15 '] https://zhuanlan.zhihu.com/p/111014448 please select a download mirror, such as USTC, Type 1 press Enter. The source is sometimes unstable, and if git clones report errors rerunce the script to select the source. Cask is not required. Some people do. University of Science and Technology of China download source 2, Tsinghua University download source 3, Beijing Foreign Studies University download source 4, Tencent download source 5, Alibaba download source please enter the number: 1 you have selected university of Science and Technology of China download source!! This script will delete the previous BREW (including the software it downloaded), back it up yourself. -> Run the script now (N/Y) Y -> Run the script now (N/Y) In the top left apple icon -> System Preferences -> Users & Groups -> Change passwords. Delete the previous BREW and create a new Homebrew folder by running the command. Please enter the boot Password, the input process is not displayed, after entering the Password press Password: Start Run -- Back up /usr/local/homebrew to the system desktop.... -- /usr/local/homebrew Backup completed -> Create folder /usr/local/homebrew run code ==> /usr/bin/sudo/bin/mkdir -p /usr/local/homebrew This step is successful Run the following command: ==> /usr/bin/sudo/bin/chmod -r a+ RWX /usr/local/homebrew Run the following command: ==> /usr/bin/sudo /usr/sbin/chown kye /usr/local/homebrew ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/homebrew xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools. Install Git before running this script, the system in the pop-up window, click on the "install" button If there is no popup window of the old system, the need to download and install: https://sourceforge.net/projects/git-osx-installer/ xcode - select: note: install requested for command line developer toolsCopy the code
  1. Rubbish! Install Git again! But I will not give in! Xcode Command Line Tools (Xcode Command Line Tools)

We choose to manually install (you can also try to use the xcode – select – install command to install the tools) : developer.apple.com/download/mo…

  1. Installation:

To test whether the installation is successful:

Book-Pro ~ % gcc -v Configured with: --prefix=/Library/Developer/CommandLineTools/usr - with - GXX - include - dir = / Library/Developer/CommandLineTools/SDKs/MacOSX10.15 SDK/usr/include/c + + / 2 Apple clang Version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-Darwin19.4.0 Thread Model: POSIx InstalledDir: / Library/Developer/CommandLineTools/usr/bin Book - Pro ~ % git version git version 2.24.3 (Apple git - 128)Copy the code

Success!

  1. Repeat step 6 to run successfully:

  1. Installation of yarn

Install the node: nodejs.org/zh-cn/downl… NPM install YARN

npm install -g yarn
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kye/.npm/_logs/2021-04-21T11_56_31_343Z-debug.log
Copy the code

Solution: sudo NPM I -g yarn

➜ ~ sudo NPM I -g yarn > [email protected] preinstall /usr/local/lib/node_modules/yarn > :; (node ./preinstall.js > /dev/null 2>&1 || true) /usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js /usr/local/bin/yarn -> /usr/local/lib/node_modules/ yarn.js + [email protected] added 1 package in 1.462sCopy the code