文档章节

react native 安装

zcl111
 zcl111
发布于 2016/05/19 10:13
字数 1488
阅读 38
收藏 2
点赞 2
评论 1

http://blog.csdn.net/xu_fu/article/details/48571941

http://www.csdn.net/article/2015-09-24/2825787-react-native

Last login: Wed May 11 21:38:13 on console
zcldeMacBook-Air:~ zcl$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
;==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their owner set to zcl:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin

Press RETURN to continue or any other key to abort
zcldeMacBook-Air:~ zcl$
zcldeMacBook-Air:~ zcl$ brew install node
-bash: brew: command not found
zcldeMacBook-Air:~ zcl$ brew install node
-bash: brew: command not found
zcldeMacBook-Air:~ zcl$ brew -v
-bash: brew: command not found
zcldeMacBook-Air:~ zcl$ sudo
usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s]
            [<command>]
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ...
zcldeMacBook-Air:~ zcl$ su root
Password:
su: Sorry
zcldeMacBook-Air:~ zcl$ su root
Password:
su: Sorry
zcldeMacBook-Air:~ zcl$ su root
Password:
su: Sorry
zcldeMacBook-Air:~ zcl$ su root
Password:
su: Sorry
zcldeMacBook-Air:~ zcl$ su root
Password:
su: Sorry
zcldeMacBook-Air:~ zcl$ su root
Password:
su: Sorry
zcldeMacBook-Air:~ zcl$ sudo passwd root
Password:
Sorry, try again.
Password:
Changing password for root.
New password:
Retype new password:
zcldeMacBook-Air:~ zcl$ su root
Password:
sh-3.2# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Don't run this as root!
sh-3.2# su zcl
bash-3.2$ sudo zcl
sudo: zcl: command not found
bash-3.2$ x
bash: x: command not found
bash-3.2$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their owner set to zcl:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin
==> /usr/bin/sudo /usr/sbin/chown zcl /usr/local/. /usr/local/bin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown zcl /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 486, done.
remote: Compressing objects: 100% (440/440), done.
remote: Total 486 (delta 27), reused 350 (delta 17), pack-reused 0
Receiving objects: 100% (486/486), 773.75 KiB | 139.00 KiB/s, done.
Resolving deltas: 100% (27/27), done.
From https://github.com/Homebrew/brew
 * [new branch]      master     -> origin/master
HEAD is now at 406fdbb brew.sh: drop obsolete source in update-preinstall
==> Tapping homebrew/core
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 3706, done.
remote: Compressing objects: 100% (3587/3587), done.
remote: Total 3706 (delta 13), reused 2520 (delta 9), pack-reused 0
Receiving objects: 100% (3706/3706), 2.87 MiB | 424.00 KiB/s, done.
Resolving deltas: 100% (13/13), done.
Checking connectivity... done.
Tapped 3583 formulae (3,732 files, 8.9M)
==> Installation successful!
==> Next steps
Run `brew help` to get started
Further documentation: https://git.io/brew-docs
==> Homebrew has enabled anonymous aggregate user behaviour analytics
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics
bash-3.2$ brew -v
Homebrew 0.9.9 (git revision 406f; last commit 2016-05-18)
Homebrew/homebrew-core (git revision 2040; last commit 2016-05-18)
bash-3.2$ brew install nvm
==> Downloading https://github.com/creationix/nvm/archive/v0.31.1.tar.gz
==> Downloading from https://codeload.github.com/creationix/nvm/tar.gz/v0.31.1
######################################################################## 100.0%
==> Caveats
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.

You should create NVM's working directory if it doesn't exist:

  mkdir ~/.nvm

Add the following to ~/.bash_profile or your desired shell
configuration file:

  export NVM_DIR="$HOME/.nvm"
  . "$(brew --prefix nvm)/nvm.sh"

You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/Cellar/nvm/0.31.1 will destroy any nvm-installed Node installations
upon upgrade/reinstall.

Type `nvm help` for further information.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/nvm/0.31.1: 6 files, 93.2K, built in 11 seconds
bash-3.2$ nvm install node && nvm alias default node
bash: nvm: command not found
bash-3.2$ nvm -v
bash: nvm: command not found
bash-3.2$ node -v
bash: node: command not found
bash-3.2$ brew install nvm
Warning: nvm-0.31.1 already installed
bash-3.2$ mkdir ~/.nvm
bash-3.2$ export NVM_DIR="$HOME/.nvm"
bash-3.2$   . "$(brew --prefix nvm)/nvm.sh"
bash-3.2$ nvm -v

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

bash-3.2$ nvm install node && nvm alias default node
Downloading https://nodejs.org/dist/v6.2.0/node-v6.2.0-darwin-x64.tar.gz...
######################################################################## 100.0%
Now using node v6.2.0 (npm v3.8.9)
Creating default alias: default -> node (-> v6.2.0)
default -> node (-> v6.2.0)
bash-3.2$ node -v
v6.2.0
bash-3.2$ npm -v
3.8.9
bash-3.2$ brew install watchman
==> Installing dependencies for watchman: pcre
==> Installing watchman dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.38.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pcre-8.38.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/pcre/8.38: 203 files, 5.4M
==> Installing watchman
==> Downloading https://homebrew.bintray.com/bottles/watchman-4.5.0.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring watchman-4.5.0.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/watchman/4.5.0: 20 files, 344K
bash-3.2$ brew install flow
==> Downloading https://homebrew.bintray.com/bottles/flow-0.25.0.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring flow-0.25.0.yosemite.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/flow/0.25.0: 7 files, 4.6M
bash-3.2$ npm install -g react-native-cli
/Users/zcl/.nvm/versions/node/v6.2.0/bin/react-native -> /Users/zcl/.nvm/versions/node/v6.2.0/lib/node_modules/react-native-cli/index.js
/Users/zcl/.nvm/versions/node/v6.2.0/lib
└─┬ react-native-cli@0.2.0
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├─┬ has-ansi@2.0.0
  │ │ └── ansi-regex@2.0.0
  │ ├── strip-ansi@3.0.1
  │ └── supports-color@2.0.0
  ├── minimist@1.2.0
  ├─┬ prompt@0.2.14
  │ ├── pkginfo@0.4.0
  │ ├─┬ read@1.0.7
  │ │ └── mute-stream@0.0.6
  │ ├── revalidator@0.1.8
  │ ├─┬ utile@0.2.1
  │ │ ├── async@0.2.10
  │ │ ├── deep-equal@1.0.1
  │ │ ├── i@0.3.5
│ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├── ncp@0.4.2
  │ │ └─┬ rimraf@2.5.2
  │ │   └─┬ glob@7.0.3
  │ │     ├─┬ inflight@1.0.5
  │ │     │ └── wrappy@1.0.2
  │ │     ├── inherits@2.0.1
  │ │     ├─┬ minimatch@3.0.0
  │ │     │ └─┬ brace-expansion@1.1.4
  │ │     │   ├── balanced-match@0.4.1
  │ │     │   └── concat-map@0.0.1
  │ │     ├── once@1.3.3
  │ │     └── path-is-absolute@1.0.0
  │ └─┬ winston@0.8.3
  │   ├── colors@0.6.2
  │   ├── cycle@1.0.3
  │   ├── eyes@0.1.8
  │   ├── isstream@0.1.2
  │   ├── pkginfo@0.3.1
  │   └── stack-trace@0.0.9
  └── semver@5.1.0

bash-3.2$

© 著作权归作者所有

共有 人打赏支持
zcl111
粉丝 3
博文 92
码字总数 11552
作品 0
六安
程序员
加载中

评论(1)

家有-小辉
家有-小辉
赞一个
React Native初体验

混合开发一直都比较想接触的技术,所以这几天就学习了下React Native的配置及JavaScript的基础,体验一把混合开发的魅力。 一、React Native介绍 Learn once,Write anywhere 以下内容来自:...

Ruheng ⋅ 2017/10/24 ⋅ 0

React-Native体验安卓开发(windows10)

环境准备: 1:安装jdk8,并且配置jdk环境变量; 2:下载android sdk,并安装更新; 3:安装python2.7,并且配置py环境变量; 4:安装git2.5,并且配置git环境变量; 5:安装vs2015,最好关于...

扬州炒饭 ⋅ 2016/03/01 ⋅ 0

Mac配置React-Native开发环境

安装相关软件 Homebrew Node 注意:安装完node如果用npm安装其他包时进度缓慢可以设置npm镜像: React-Native集成环境 Xcode:运行iOS 去app Store下载即可 Android Studio:运行android 下载...

⋅ 01/08 ⋅ 0

Mac 下react-native环境搭建

参考资料http://bbs.reactnative.cn/topic/11/react-native%E4%B8%AD%E6%96%87%E7%BD%91%E5%AE%98%E6%96%B9%E5%8F%91%E5%B8%83%E5%AE%8C%E6%95%B4%E6%96%B0%E9%A1%B9%E7%9B%AE%E5%8C%85-%E6%......

ddcz ⋅ 2016/01/09 ⋅ 0

React-Native 之 环境配置和简单使用

前言 学习本系列内容需要具备一定 HTML 开发基础,没有基础的朋友可以先转至 HTML快速入门(一) 学习 本人接触 React Native 时间并不是特别长,所以对其中的内容和性质了解可能会有所偏差,在...

postdep ⋅ 05/01 ⋅ 0

React Native Windows Android开发环境搭建

安装步骤: 1) ReactNative Android运行环境 (一) Python安装 (二) NodeJs安装 (三) React-native安装 (四) JDK安装 (五) Android SDK解压 (六) Gennymotion安装 2) ReactNative开发环境 (一...

恒源祥 ⋅ 2016/09/13 ⋅ 0

React Native第1天——环境配置及知识体系

我(web+android开发经验)学习React Native过程中接触的知识点和学习的线路图。 React Native第1天——环境配置及知识体系(http://my.oschina.net/addcn/blog/647290) 掌握环境配置及运行h...

addcn ⋅ 2016/03/25 ⋅ 0

在window下react-native环境安装

安装Node.js 安装react-native命令行工具: npm install -g react-native-cli 创建项目:进入你的工作目录,运行react-native init AwesomeProject//粘贴工程不可 在工作目录下运行packager:re...

不爱吃鱼的喵 ⋅ 2016/05/19 ⋅ 0

React-Native入门指导之iOS篇

写在前面 1. 什么是React-Native?      React-Native是:Facebook 在2015年初React.js技术研讨大会上公布的一个开源项目。支持用开源的JavaScript库React.js来开发iOS和Android原生App...

IT追寻者 ⋅ 2016/06/13 ⋅ 0

RN学习第一篇:MAC配置RN环境

我们在使用之前我们最基本的就是环境的搭建,不能搭建环境,一切白搭,这篇文章我就简单的介绍一下环境搭建过程,并且运行第一个项目 React Native搭建开发环境.png 文章目录 1、React Nativ...

辉哥de简书 ⋅ 2017/12/24 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

关于“幂等”操作

一个幂等(idempotent)操作的特点是其任意多次执行所产生的影响均与一次执行的影响相同. 开发中, 我们经常考虑幂等操作的场景有“接口调用”、“MQ消费”、“自动任务”等 接口调用, 可能出现...

零二一七 ⋅ 22分钟前 ⋅ 0

Dubbo服务服务暴露之ProxyFactory Invoker

Dubbo服务暴露过程中有涉及到调用ProxyFactory 中方法获取Invoker对象的过程,现在我们来深究下源码,来看下这个过程是在做些什么,返回的Invoker 对象是什么,我们来看一下代码的切入点: ...

哲别0 ⋅ 37分钟前 ⋅ 0

GP两种连接方式性能测试

GP两种连接方式性能测试 Pivotal import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; public class GPQueryStrin......

仔仔1993 ⋅ 41分钟前 ⋅ 0

jsonrpc-4j代码解析

解析文件 AutoJsonRpcServiceImplExporter JsonServiceExporter AutoJsonRpcServiceImplExporter 路径:com.googlecode.jsonrpc4j.spring.AutoJsonRpcServiceImplExporter AutoJsonRpcServi......

郭恩洲_OSC博客 ⋅ 今天 ⋅ 0

百度搜索

from selenium import webdriver import time brower=webdriver.Firefox() brower.get('http://www.baidu.com') input=brower.find_element_by_id('kw') input.send_keys('中南大学') time.s......

南桥北木 ⋅ 今天 ⋅ 0

tomcat 日志记录器

1、日志记录器是记录消息的组件 日志记录器需要与某个servlet 容器相关联 2、Logger 接口 共定义了5种日志级别:FATAL、ERROR、WARNING、INFORMATION、DEBUGGER setVerbosity 设置级别 setC...

职业搬砖20年 ⋅ 今天 ⋅ 0

Thrift RPC实战(三) Thrift序列化机制

1.Thrift基础架构 Thrift是一个客户端和服务端的架构体系,数据通过socket传输; 具有自己内部定义的传输协议规范(TProtocol)和传输数据标准(TTransports); 通过IDL脚本对传输数据的数据结构...

lemonLove ⋅ 今天 ⋅ 0

网站建设就要像2018世界杯的俄罗斯队大杀四方[图]

今天心情不错,因为昨天晚上观看了世界杯比赛,尤其是对俄罗斯队的大杀四方感到十分霸气侧漏啊,因此我联想到了自己的博客网站,我的博客是去年年底上线的,一直想建设一个关于读书和读后感作...

原创小博客 ⋅ 今天 ⋅ 0

linux 信号机制

signal(SIGPIPE, SIG_IGN); TCP是全双工的信道, 可以看作两条单工信道, TCP连接两端的两个端点各负责一条. 当对端调用close时, 虽然本意是关闭整个两条信道, 但本端只是收到FIN包. 按照TCP协...

xxdd ⋅ 今天 ⋅ 0

my.cnf, my-small.cnf, my-medium.cnf, my-large.cnf

1. my-small.cnf # Example MySQL config file for small systems.## This is for a system with little memory (<= 64M) where MySQL is only used# from time to time and it's importa......

周云台 ⋅ 今天 ⋅ 0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部