美文网首页
macOS相关环境安装

macOS相关环境安装

作者: sunflower1518 | 来源:发表于2018-02-01 10:10 被阅读464次

Homebrew

此处参考:https://reactnative.cn/docs/0.51/getting-started.html#content
Homebrew, Mac系统的包管理器,用于安装一些其他必需的工具软件。

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

注意:在Max OS X 10.11(El Capitan)版本中,homebrew在安装软件时可能会碰到/usr/local目录不可写的权限问题。可以使用下面的命令修复(把目录的所有者改为当前用户):

sudo chown -R `whoami` /usr/local
大概过程
Last login: Wed Jan 31 11:34:37 on ttys002
Housl@localhost  ~  /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
==> The following new directories will be created:
/usr/local/Frameworks
/usr/local/sbin
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Frameworks /usr/local/sbin
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Frameworks /usr/local/sbin
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown Housl /usr/local/Frameworks /usr/local/sbin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Frameworks /usr/local/sbin
==> /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 Housl /Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.2
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ (macOS\ High\ Sierra\ version\ 10.13)\ for\ Xcode-9.2
Software Update Tool


Downloading Command Line Tools (macOS High Sierra version 10.13) for Xcode

Downloaded Command Line Tools (macOS High Sierra version 10.13) for Xcode
Installing Command Line Tools (macOS High Sierra version 10.13) for Xcode
Done with Command Line Tools (macOS High Sierra version 10.13) for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
Password:
Sorry, try again.
Password:
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
remote: Counting objects: 1727, done.
remote: Compressing objects: 100% (510/510), done.
remote: Total 1727 (delta 1289), reused 1607 (delta 1180), pack-reused 0
Receiving objects: 100% (1727/1727), 275.63 KiB | 180.00 KiB/s, done.
Resolving deltas: 100% (1289/1289), completed with 219 local objects.
From https://github.com/Homebrew/brew
8de97dca..701ecb49  master     -> origin/master
* [new tag]           1.4.0      -> 1.4.0
* [new tag]           1.4.1      -> 1.4.1
* [new tag]           1.4.2      -> 1.4.2
* [new tag]           1.4.3      -> 1.4.3
* [new tag]           1.5.0      -> 1.5.0
* [new tag]           1.5.1      -> 1.5.1
* [new tag]           1.5.2      -> 1.5.2
HEAD is now at 701ecb49 Merge pull request #3747 from MikeMcQuaid/no-tap-deprecated
Updated 1 tap (homebrew/core).
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/machou/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
==> New Formulae
amber                                hlint                                prodigal
arcade-learning-environment          hmmer                                pspg
。。。。。。。。。。。太多。。此处 省略...
go-statik                            picard-tools                         yq
google-authenticator-libpam          pinboard-notes-backup                zig
gox                                  plank
==> Updated Formulae
cocoapods ✔                 freeciv                     libressl                    ranger
coreutils ✔                 freediameter                librsvg                     ratfor
git ✔                       freeling                    libsass                     rbenv-aliases
。。。。。。。。。。。太多。。此处 省略...
fox                         libre                       rakudo-star
fpc                         librealsense                rancher-cli
==> Renamed Formulae
camlistore -> perkeep                                   tachyon -> alluxio
==> Deleted Formulae
angolmois                            gst-plugins-base@0.10                mongodb@2.6
antlr@3                              gst-plugins-good@0.10                moodbar
。。。。。。。。。。。省略...
gsl@1                                lua@5.3                              zeromq@4.1
gst-plugins-bad@0.10                 mg3a
==> Installation successful!

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

==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
Housl@localhost  ~ 
使用Homebrew安装
//Homebrew安装node
brew install node

//Homebrew安装cocoapods
brew install cocoapods

相关文章

网友评论

      本文标题:macOS相关环境安装

      本文链接:https://www.haomeiwen.com/subject/mfarzxtx.html