一、安装nvm
第一步:在命令行运行如下命令
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
如果报:Failed to connect to raw.githubusercontent.com port 443: Connection refused,这个错误,则在hosts文件中添加一行:199.232.68.133 raw.githubusercontent.com
第二步:命令行分别运行如下两行命令
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
二、安装svn
第一步:安装brew命令
运行如下命令行
/bin/bash -c "$(curl -fsSL https://gitee.com/iamhefang/homebrew-install/raw/master/install.sh)"
第二步:按照提示依次运行如下命令行
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/berheley/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
echo 'export HOMEBREW_BREW_GIT_REMOTE="https://gitee.com/mirrors/homebrew.git"' >> /Users/berheley/.zprofile
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://gitee.com/Homebrew/homebrew-core.git"' >> /Users/berheley/.zprofile
export HOMEBREW_BREW_GIT_REMOTE="https://gitee.com/mirrors/homebrew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://gitee.com/Homebrew/homebrew-core.git"
第三步:安装成功会提示如下信息
==> subversion
svntools have been installed to:
/opt/homebrew/opt/subversion/libexec
The perl bindings are located in various subdirectories of:
/opt/homebrew/opt/subversion/lib/perl5
You may need to link the Java bindings into the Java Extensions folder:
sudo mkdir -p /Library/Java/Extensions
sudo ln -s /opt/homebrew/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
三、打开真机控制台
第一步:连上手机
第二步:打卡Xcode,然后command+shift+2,最后选择右边的open console