bogon:/ zhouhaijun$ sudo cnpm install -g appium@1.7.1

Password:

Downloading appium to /usr/local/lib/node_modules/appium_tmp

Copying /usr/local/lib/node_modules/appium_tmp/_appium@1.7.1@appium to /usr/local/lib/node_modules/appium

Installing appium's dependencies to /usr/local/lib/node_modules/appium/node_modules

[1/28] appium-windows-driver@0.x installed at node_modules/_appium-windows-driver@0.5.1@appium-windows-driver

[2/28] appium-support@2.x installed at node_modules/_appium-support@2.11.0@appium-support

[3/28] appium-fake-driver@0.x installed at node_modules/_appium-fake-driver@0.2.0@appium-fake-driver

[4/28] appium-base-driver@2.x installed at node_modules/_appium-base-driver@2.15.7@appium-base-driver

[5/28] appium-mac-driver@1.x installed at node_modules/_appium-mac-driver@1.0.2@appium-mac-driver

[6/28] asyncbox@2.x existed at node_modules/_asyncbox@2.3.1@asyncbox

[7/28] babel-runtime@=5.8.24 existed at node_modules/_babel-runtime@5.8.24@babel-runtime

[8/28] bluebird@2.x existed at node_modules/_bluebird@2.11.0@bluebird

[9/28] continuation-local-storage@3.x existed at node_modules/_continuation-local-storage@3.2.0@continuation-local-storage

[10/28] async-lock@^1.0.0 installed at node_modules/_async-lock@1.1.0@async-lock

[11/28] lodash@4.x existed at node_modules/_lodash@4.17.4@lodash

[12/28] npmlog@2.x existed at node_modules/_npmlog@2.0.4@npmlog

[13/28] request@^2.81.0 existed at node_modules/_request@2.83.0@request

[14/28] request-promise@1.x existed at node_modules/_request-promise@1.0.2@request-promise

[15/28] argparse@1.x installed at node_modules/_argparse@1.0.9@argparse

[16/28] teen_process@1.x existed at node_modules/_teen_process@1.10.1@teen_process

[17/28] dateformat@^2.0.0 installed at node_modules/_dateformat@2.2.0@dateformat

[18/28] source-map-support@0.x installed at node_modules/_source-map-support@0.5.0@source-map-support

[19/28] winston@2.x installed at node_modules/_winston@2.4.0@winston

heapdump@0.x found binding.gyp file, auto run "node-gyp rebuild"

  CXX(target) Release/obj.target/addon/src/heapdump.o

  SOLINK_MODULE(target) Release/addon.node

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

[20/28] heapdump@0.x installed at node_modules/_heapdump@0.3.9@heapdump

fsevents@1.1.3 download from binary mirror: {"module_name":"fse","module_path":"./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/","remote_path":"./v{version}/","package_name":"{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz","host":"https://npm.taobao.org/mirrors/fsevents"}

[21/28] fsevents@1.x installed at node_modules/_fsevents@1.1.3@fsevents

[22/28] appium-ios-driver@1.x installed at node_modules/_appium-ios-driver@1.28.0@appium-ios-driver

[23/28] appium-youiengine-driver@1.x installed at node_modules/_appium-youiengine-driver@1.0.14@appium-youiengine-driver

[24/28] appium-xcuitest-driver@2.x installed at node_modules/_appium-xcuitest-driver@2.58.1@appium-xcuitest-driver

[25/28] appium-selendroid-driver@1.x installed at node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver

[26/28] appium-android-driver@1.x installed at node_modules/_appium-android-driver@1.32.4@appium-android-driver

[27/28] appium-uiautomator2-driver@0.x installed at node_modules/_appium-uiautomator2-driver@0.7.4@appium-uiautomator2-driver

[28/28] appium-espresso-driver@^1.0.0-beta.3 installed at node_modules/_appium-espresso-driver@1.0.0-beta.3@appium-espresso-driver

execute post install 5 scripts...

[1/5] scripts.install appium-windows-driver@0.x run "node install-npm.js"

Not installing WinAppDriver since did not detect a Windows system

[1/5] scripts.install appium-windows-driver@0.x finished in 411ms

[2/5] scripts.install appium-android-driver@1.32.4 appium-chromedriver@^3.0.0 run "node install-npm.js"

info Chromedriver Install Installing Chromedriver version '2.33' for platform 'mac' and architecture '64'

info Chromedriver Install Opening temp file to write chromedriver_mac64 to...

info Chromedriver Install Downloading https://tnpm-hz.oss-cn-hangzhou.aliyuncs.com/dist/chromedriver/2.33/chromedriver_mac64.zip...

info Chromedriver Install Writing binary content to /tmp/20171016-4559-1dz52cv.v8j65stt9/chromedriver_mac64.zip...

info Chromedriver Install Extracting /tmp/20171016-4559-1dz52cv.v8j65stt9/chromedriver_mac64.zip to /tmp/20171016-4559-1dz52cv.v8j65stt9/chromedriver_mac64

info Chromedriver Install Creating /usr/local/lib/node_modules/appium/node_modules/_appium-chromedriver@3.1.3@appium-chromedriver/chromedriver/mac...

info Chromedriver Install Copying unzipped binary, reading from /tmp/20171016-4559-1dz52cv.v8j65stt9/chromedriver_mac64/chromedriver...

info Chromedriver Install Writing to /usr/local/lib/node_modules/appium/node_modules/_appium-chromedriver@3.1.3@appium-chromedriver/chromedriver/mac/chromedriver...

info Chromedriver Install /usr/local/lib/node_modules/appium/node_modules/_appium-chromedriver@3.1.3@appium-chromedriver/chromedriver/mac/chromedriver successfully put in place

[2/5] scripts.install appium-android-driver@1.32.4 appium-chromedriver@^3.0.0 finished in 5s

[3/5] scripts.install fsevents@1.x run "node install"

[fsevents] Success: "/usr/local/lib/node_modules/appium/node_modules/_fsevents@1.1.3@fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed

Pass --update-binary to reinstall or --build-from-source to recompile

[3/5] scripts.install fsevents@1.x finished in 232ms

[4/5] scripts.install appium-selendroid-driver@1.x run "node ./bin/install.js"

dbug AndroidDriver Getting Java version

info AndroidDriver Java version is: 1.8.0_152

info Selendroid Ensuring /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download exists

info Selendroid Downloading Selendroid standalone server version 0.17.0 from http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar

Selendroid setup files did not yet exist, waiting...

dbug AndroidDriver Getting Java version

info AndroidDriver Java version is: 1.8.0_152

info Selendroid Ensuring /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download exists

info Selendroid Downloading Selendroid standalone server version 0.17.0 from http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar

Selendroid setup files did not yet exist, waiting...

dbug AndroidDriver Getting Java version

info AndroidDriver Java version is: 1.8.0_152

info Selendroid Ensuring /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download exists

info Selendroid Downloading Selendroid standalone server version 0.17.0 from http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar

info Selendroid Writing binary content to /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download/selendroid-server.jar.tmp

info Selendroid Selendroid standalone server downloaded

info Selendroid Determining AndroidManifest location

info Selendroid Determining server apk location

info Selendroid Extracting manifest and apk to /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid/download

info Selendroid Copying manifest and apk to /usr/local/lib/node_modules/appium/node_modules/_appium-selendroid-driver@1.6.4@appium-selendroid-driver/selendroid

info Selendroid Cleaning up temp files

info Selendroid Fixing AndroidManifest icon bug

[4/5] scripts.install appium-selendroid-driver@1.x finished in 3m

[5/5] scripts.install appium-uiautomator2-driver@0.x run "node ./bin/install.js"

dbug AndroidDriver Getting Java version

info AndroidDriver Java version is: 1.8.0_152

info UiAutomator2 downloading UiAutomator2 Server APK v0.1.9 : https://github.com/appium/appium-uiautomator2-server/releases/download/v0.1.9/appium-uiautomator2-server-v0.1.9.apk

info UiAutomator2 downloading UiAutomator2 Server test APK v0.1.9 : https://github.com/appium/appium-uiautomator2-server/releases/download/v0.1.9/appium-uiautomator2-server-debug-androidTest.apk

Error: connect ETIMEDOUT 54.231.98.80:443

UiAutomator2 setup files do not yet exist, waiting...

info UiAutomator2 downloading UiAutomator2 Server APK v0.1.9 : https://github.com/appium/appium-uiautomator2-server/releases/download/v0.1.9/appium-uiautomator2-server-v0.1.9.apk

info UiAutomator2 downloading UiAutomator2 Server test APK v0.1.9 : https://github.com/appium/appium-uiautomator2-server/releases/download/v0.1.9/appium-uiautomator2-server-debug-androidTest.apk

info UiAutomator2 UiAutomator2 Server APKs downloaded

[5/5] scripts.install appium-uiautomator2-driver@0.x finished in 2m

Recently updated (since 2017-11-09): 10 packages (detail see file /usr/local/lib/node_modules/appium/node_modules/.recently_updates.txt)

  Today:

    appium-uiautomator2-driver@0.x(0.7.4) (04:18:37)

    appium-mac-driver@1.0.2 teen_process@^1.7.0(1.10.1) (04:00:29)

    appium-android-driver@1.32.4 appium-android-bootstrap@^2.7.5(2.10.0) (04:15:59)

    appium-android-driver@1.32.4 jimp@0.2.28 pngjs@^3.0.0(3.3.1) (02:40:28)

  2017-11-15

    fsevents@1.1.3 nan@^2.3.0(2.8.0) (19:34:24)

  2017-11-14

    appium-ios-driver@1.x(1.28.0) (22:30:07)

  2017-11-13

    appium-support@2.11.0 archiver@1.3.0 tar-stream@^1.5.0(1.5.5) (19:31:21)

  2017-11-11

    fsevents@1.x(1.1.3) (06:23:22)

  2017-11-10

    appium-android-driver@1.32.4 appium-chromedriver@^3.0.0(3.1.3) (04:07:40)

  2017-11-09

    appium-xcuitest-driver@2.x(2.58.1) (05:57:57)

All packages installed (430 packages installed from npm registry, used 7m, speed 314.83kB/s, json 373(699.4kB), tarball 130.75MB)

[appium@1.7.1] link /usr/local/bin/appium@ -> /usr/local/lib/node_modules/appium/build/lib/main.js

bogon:/ zhouhaijun$ appium

[Appium] Welcome to Appium v1.7.1

[Appium] Appium REST http interface listener started on 0.0.0.0:4723

^Z

[6]+  Stopped                 appium

bogon:/ zhouhaijun$ npm --registry http://registry.npm.taobao.org install -g wd

/usr/local/bin/wd -> /usr/local/lib/node_modules/wd/lib/bin.js


> wd@1.4.1 install /usr/local/lib/node_modules/wd

> node scripts/build-browser-scripts


/usr/local/lib

└─┬ wd@1.4.1 

  ├─┬ archiver@1.3.0 

  │ ├─┬ archiver-utils@1.3.0 

  │ │ ├── graceful-fs@4.1.11 

  │ │ ├── lazystream@1.0.0 

  │ │ └─┬ normalize-path@2.1.1 

  │ │   └── remove-trailing-separator@1.1.0 

  │ ├── buffer-crc32@0.2.13 

  │ ├─┬ glob@7.1.2 

  │ │ ├── fs.realpath@1.0.0 

  │ │ ├─┬ inflight@1.0.6 

  │ │ │ └── wrappy@1.0.2 

  │ │ ├── inherits@2.0.3 

  │ │ ├─┬ minimatch@3.0.4 

  │ │ │ └─┬ brace-expansion@1.1.8 

  │ │ │   ├── balanced-match@1.0.0 

  │ │ │   └── concat-map@0.0.1 

  │ │ ├── once@1.4.0 

  │ │ └── path-is-absolute@1.0.1 

  │ ├─┬ readable-stream@2.3.3 

  │ │ ├── core-util-is@1.0.2 

  │ │ ├── isarray@1.0.0 

  │ │ ├── process-nextick-args@1.0.7 

  │ │ ├── safe-buffer@5.1.1 

  │ │ └── string_decoder@1.0.3 

  │ ├─┬ tar-stream@1.5.5 

  │ │ ├── bl@1.2.1 

  │ │ ├── end-of-stream@1.4.0 

  │ │ └── xtend@4.0.1 

  │ ├── walkdir@0.0.11 

  │ └─┬ zip-stream@1.2.0 

  │   └─┬ compress-commons@1.2.2 

  │     └─┬ crc32-stream@2.0.0 

  │       └── crc@3.5.0 

  ├── async@2.0.1 

  ├── lodash@4.16.2 

  ├─┬ mkdirp@0.5.1 

  │ └── minimist@0.0.8 

  ├── q@1.4.1 

  ├─┬ request@2.79.0 

  │ ├── aws-sign2@0.6.0 

  │ ├── aws4@1.6.0 

  │ ├── caseless@0.11.0 

  │ ├─┬ combined-stream@1.0.5 

  │ │ └── delayed-stream@1.0.0 

  │ ├── extend@3.0.1 

  │ ├── forever-agent@0.6.1 

  │ ├─┬ form-data@2.1.4 

  │ │ └── asynckit@0.4.0 

  │ ├─┬ har-validator@2.0.6 

  │ │ ├─┬ chalk@1.1.3 

  │ │ │ ├── ansi-styles@2.2.1 

  │ │ │ ├── escape-string-regexp@1.0.5 

  │ │ │ ├─┬ has-ansi@2.0.0 

  │ │ │ │ └── ansi-regex@2.1.1 

  │ │ │ ├── strip-ansi@3.0.1 

  │ │ │ └── supports-color@2.0.0 

  │ │ ├── commander@2.11.0 

  │ │ ├─┬ is-my-json-valid@2.16.1 

  │ │ │ ├── generate-function@2.0.0 

  │ │ │ ├─┬ generate-object-property@1.2.0 

  │ │ │ │ └── is-property@1.0.2 

  │ │ │ └── jsonpointer@4.0.1 

  │ │ └─┬ pinkie-promise@2.0.1 

  │ │   └── pinkie@2.0.4 

  │ ├─┬ hawk@3.1.3 

  │ │ ├── boom@2.10.1 

  │ │ ├── cryptiles@2.0.5 

  │ │ ├── hoek@2.16.3 

  │ │ └── sntp@1.0.9 

  │ ├─┬ http-signature@1.1.1 

  │ │ ├── assert-plus@0.2.0 

  │ │ ├─┬ jsprim@1.4.1 

  │ │ │ ├── assert-plus@1.0.0 

  │ │ │ ├── extsprintf@1.3.0 

  │ │ │ ├── json-schema@0.2.3 

  │ │ │ └─┬ verror@1.10.0 

  │ │ │   └── assert-plus@1.0.0 

  │ │ └─┬ sshpk@1.13.1 

  │ │   ├── asn1@0.2.3 

  │ │   ├── assert-plus@1.0.0 

  │ │   ├── bcrypt-pbkdf@1.0.1 

  │ │   ├─┬ dashdash@1.14.1 

  │ │   │ └── assert-plus@1.0.0 

  │ │   ├── ecc-jsbn@0.1.1 

  │ │   ├─┬ getpass@0.1.7 

  │ │   │ └── assert-plus@1.0.0 

  │ │   ├── jsbn@0.1.1 

  │ │   └── tweetnacl@0.14.5 

  │ ├── is-typedarray@1.0.0 

  │ ├── isstream@0.1.2 

  │ ├── json-stringify-safe@5.0.1 

  │ ├─┬ mime-types@2.1.17 

  │ │ └── mime-db@1.30.0 

  │ ├── oauth-sign@0.8.2 

  │ ├── qs@6.3.2 

  │ ├── stringstream@0.0.5 

  │ ├─┬ tough-cookie@2.3.3 

  │ │ └── punycode@1.4.1 

  │ ├── tunnel-agent@0.4.3 

  │ └── uuid@3.1.0 

  ├─┬ underscore.string@3.3.4 

  │ ├── sprintf-js@1.1.1 

  │ └── util-deprecate@1.0.2 

  └── vargs@0.1.0 


bogon:/ zhouhaijun$ appium-doctor

info AppiumDoctor Appium Doctor v.1.4.3

info AppiumDoctor ### Diagnostic starting ###

info AppiumDoctor  The Node.js binary was found at: /usr/local/bin/node

info AppiumDoctor  Node version is 6.11.5

info AppiumDoctor  Xcode is installed at: /Applications/Xcode.app/Contents/Developer

info AppiumDoctor  Xcode Command Line Tools are installed.

info AppiumDoctor  DevToolsSecurity is enabled.

info AppiumDoctor  The Authorization DB is set up properly.

info AppiumDoctor  Carthage was found at: /usr/local/bin/carthage

info AppiumDoctor  HOME is set to: /Users/zhouhaijun

info AppiumDoctor  ANDROID_HOME is set to: /Users/zhouhaijun/androidsdk/android-sdk-macosx

info AppiumDoctor  JAVA_HOME is set to: /Library/java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home

info AppiumDoctor  adb exists at: /Users/zhouhaijun/androidsdk/android-sdk-macosx/platform-tools/adb

info AppiumDoctor  android exists at: /Users/zhouhaijun/androidsdk/android-sdk-macosx/tools/android

info AppiumDoctor  emulator exists at: /Users/zhouhaijun/androidsdk/android-sdk-macosx/tools/emulator

info AppiumDoctor  Bin directory of $JAVA_HOME is set

info AppiumDoctor ### Diagnostic completed, no fix needed. ###

info AppiumDoctor 

info AppiumDoctor Everything looks good, bye!

info AppiumDoctor 

bogon:/ zhouhaijun$