新入手一代macbook pro 16 寸,然后发现terminal 颜色太差,想调整一下颜色,准备下载oh-my-zsh,安装的时候发现巨多坑。
我的os未升级,版本为 macOS Catalina Version 10.14.0
首先你采用美化并增强Mac终端介绍的方法,在终端中运行:
@macbook ~ $ git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.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.
@macbook ~ $ which brew
brew not found
报错没有安装开发工具
安装home brew,git,开发工具等
用ruby安装
按照stack overflow上的介绍,运行以下命令:
@macbook ~ $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
报错无法链接,原因类似404,解决办法自己找
然后通过高人帮忙打开在chrome中把https://raw.githubusercontent.com/Homebrew/install/master/install
粘贴打开网站发现换了地址和安装方法:
中间还测试了安装brew命令遇到坑用sudo vim /etc/hosts
, 在最后一行加上“199.232.28.133 raw.githubusercontent.com” 保存后,还是不行。
@macbook ~ $ sudo vim /etc/hosts
Password:
@macbook ~ $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
依然不行
用bash安装
按照上面网页的介绍,采用bash命令安装
@macbook ~ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
依然报错,链接问题。
没办法,绕过404在浏览器打开“https://raw.githubusercontent.com/Homebrew/install/master/install.sh”,将shell代码另存为“install.rb”
运行:<