1.在安装Theos之前,先安装dpkg和ldid
我们使用Homebrew来安装,如果没有安装Homebrew,在终端输入:
/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)”
如果安装了Homebrew,直接跳过这一步
2.在终端输入brew install dpkg,安装dpkg
3.在终端输入brew install dpkg ldid,安装ldid
4.安装Thoes,在终端输入:
sudo git clone --recursivehttps://github.com/theos/theos.git/opt/theos
5.然后把/opt/theos的权限改成你自己:
sudo chown $(id -u):$(id -g) /opt/theos
最后这一步也很重要,要把theos的执行路径加入到环境变量之中, 在终端输入open ~/.bash_profile ,在打开的~./bash_profile中加上这么三句:
export THEOS=/opt/theos
export PATH=$THEOS/bin:$PATH
export THEOS_DEVICE_IP=example.local THEOS_DEVICE_PORT=22
加完以后,command+s一下,然后在在终端输入source .bash_profile
6.然后在终端执行:nic.pl, 显示如下则安装成功