允许所有应用访问你的电脑
1、Mac在macOS Sierra系统下,系统偏好设置中的“安全与隐私”默认已经去除了允许“任何来源”App的选项,如果不开启会直接影响到无法运行一些第三方应用。
2、首先需要查看是否开启:点击左上角的系统偏好设置——点击“安全与隐私”——如果没有“任何来源”这个选项就是没有开启。
3、开启方法:打开Terminal,输入“终端”然后按下enter键——复制sudo spctl --master-disable粘贴到终端——粘贴后按enter输入你的电脑开机密码(输入过程中看不到输入的密码状态,正常输入即可)——输完密码后,按enter,即完成了开启。
sudo spctl --master-disable
Mac 移除下载镜像的Quarantine属性
打开终端,输入sudo xattr -r -d com.apple.quarantine
(后面有一个空格),再把dmg文件拖拽进去,回车,输入电脑密码,回车:
sudo xattr -r -d com.apple.quarantine xxx.dmg
xxx.dmg 这里是指的是dmg安装文件的绝对路径OR 相对路径
ohmyzsh Git
参考 ohmyzsh.git | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
安装
在本地克隆后获取安装脚本。
git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
cd ohmyzsh/tools
REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.sh
切换已有 ohmyzsh 至镜像源
git -C $ZSH remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
git -C $ZSH pull
参考
HomeBrew 国内Mac安装脚本
参考 HomebrewCN: Homebrew 国内安装脚本,快速部署 brew ,国内镜像
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
homeBrew 卸载脚本
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
xcrun报错
Mac 下执行命令时,报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
,表示没有安装 xcrun
命令。
Last login: Fri Nov 1 12:14:30 on ttys000
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
➜ ~ sudo xcode-select --install
Password:
xcode-select: note: install requested for command line developer tools