博客> 【React Native】Mac端iOS和Android开发环境搭建完全教程
【React Native】Mac端iOS和Android开发环境搭建完全教程
2018-10-19 05:04 评论:0 阅读:1057 xiaoaorensheng
React react-vr react-native

【React Native】Mac端iOS和Android开发环境搭建完全教程

安装iOS和Android通用依赖项

  • 安装 Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

将以上命令粘贴至终端。脚本会在执行前暂停,并说明将它将做什么。

liyuechun:~ yuechunli$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/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
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /Users/liyuechun/Library/Caches/Homebrew
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /Users/liyuechun/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown yuechunli /Users/liyuechun/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown yuechunli /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 346, done.
remote: Compressing objects: 100% (181/181), done.
remote: Total 346 (delta 277), reused 202 (delta 153), pack-reused 0
Receiving objects: 100% (346/346), 76.15 KiB | 0 bytes/s, done.
Resolving deltas: 100% (277/277), completed with 217 local objects.
From https://github.com/Homebrew/brew
 + e1098b0e...ed9942fb master     -> origin/master  (forced update)
 * [new tag]           1.2.2      -> 1.2.2
 * [new tag]           1.2.3      -> 1.2.3
HEAD is now at ed9942fb Merge pull request #2769 from MikeMcQuaid/rubocop-no-perl-backrefs
Updated 2 taps (caskroom/cask, homebrew/core).
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/liyuechun/Library/Caches/Homebr
==> Deleting /Library/Caches/Homebrew...
==> New Formulae
angular-cli                fsql                       overmind
antlr4-cpp-runtime         get_iplayer                percona-server-mongodb
asdf                       grakn                                      zanata-client
goofys                     opus ✔
==> Deleted Formulae
autotrace           libtess2            snescom             xplanetfx
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  http://docs.brew.sh/Analytics.html

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    http://docs.brew.sh
liyuechun:~ yuechunli$ brew --version
Homebrew 1.2.3
Homebrew/homebrew-core (git revision c88f7; last commit 2017-06-13)
liyuechun:~ yuechunli$ 

Homebrew官方参考文档

微信扫一扫关注21点见服务号

  • 安装Node
brew install node

liyuechun:~ yuechunli$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-8.1.0_1.sierra.bottle.
######################################################################## 100.0%
==> Pouring node-8.1.0_1.sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/node
Target /usr/local/bin/node
already exists. You may want to remove it:
  rm '/usr/local/bin/node'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node

Possible conflicting files are:
/usr/local/bin/node
/usr/local/include/node/android-ifaddrs.h
/usr/local/share/man/man1/node.1
/usr/local/share/systemtap/tapset/node.stp
/usr/local/lib/dtrace/node.d
==> Using the sandbox
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall node`
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
收藏
0
sina weixin mail 回到顶部