iOS
Mac OSX 10.7+
XCode 4.5+ 和 Command Line Tools
sudo赋权
#brew 安装
cnsha-20875-mac:~ ziang.chen$ brew -v
Homebrew 1.3.6
Homebrew/homebrew-core (git revisionade7; last commit 2017-11-08)
#进行brew update
Brew install python
cnsha-20875-mac:~ ziang.chen$ which python
/usr/bin/python
cnsha-20875-mac:~ ziang.chen$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
cnsha-20875-mac:~ ziang.chen$ git --version
git version 2.10.1 (Apple Git-78)
cnsha-20875-mac:~ ziang.chen$ node -v
v8.9.0
cnsha-20875-mac:~ ziang.chen$ npm -v
5.5.1
==> Installation successful!
----------------------------------------------------- - - - -
cnsha-20875-mac:~ ziang.chen$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
Javac
找到对应的java目录
cnsha-20875-mac:~ ziang.chen$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
sudo vim /etc/profile
修改文件
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home"
export JAVA_HOME
CLASS_PATH="$JAVA_HOME/lib"
PATH=".$PATH:$JAVA_HOME/bin"
按ESC :wq!
安装日志
cnsha-20875-mac:~ziang.chen$ brew install libimobiledevice
==> Installing libimobiledevice
==> Downloadinghttps://homebrew.bintray.com/bottles/libimobiledevice-1.2.0_2.el
########################################################################100.0%
==> Pouring libimobiledevice-1.2.0_2.el_capitan.bottle.tar.gz
� /usr/local/Cellar/libimobiledevice/1.2.0_2:66 files, 984KB
安装一个包的依赖管理工具Carthage: brew install Carthage
需要安装xcode9
#检查
npm install -g appium-doctor
顺便贴一些最常用 Cheatsheet:
1 安装(需要 Ruby):ruby -e "$(curl-fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
2 搜索:brew search mysql
3 查询:brew info mysql主要看具体的信息,比如目前的版本,依赖,安装后注意事项等
4 更新:brew update这会更新 Homebrew 自己,并且使得接下来的两个操作有意义——
5 检查过时(是否有新版本):brew outdated这回列出所有安装的软件里可以升级的那些
6 升级:brew upgrade升级所有可以升级的软件们
7 清理:brew cleanup清理不需要的版本极其安装包缓存
常用的就这些。一般来说如果你追求新版本(不升级不舒服斯基),那么你最常用的操作序列就是这样:
brewupdate #更新 Homebrew 的信息
brewoutdated #看一下哪些软件可以升级
brewupgrade
brew upgrade; brew cleanup # 如果都要升级,直接升级完然后清理干净