朋友公司电脑上没有CocoaPods,就帮他给安装了,结果出现一大堆问题。
1、装 Xcode 和 Command Line Tools
1.1)装Xcode就不说了,直接上mac的App Store下载就行了
1.2)Command Line Tools是在装完Xcode,在Xcode菜单 -> Preferences -> Downloads那安装。
貌似新版的Xcode里面不显示,那就直接在 终端 【应用程序 -> 实用工具 -> 终端】
[objc]
xcode-select –install
[/objc]
2、装Homebrew
2.1)终端输入以下命令
[objc]
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
[/objc]
2.2)关掉终端,重新打开,输入以下内容
[objc]
brew
[/objc]
2.3)看是否会提示-bash: brew: command not found,如果会请操作2.4流程,不会则进入第3步
2.4)点击桌面空白地方,cmd + shift + G,前往文件夹输入 /etc
2.5)找到 profile ,复制到桌面,进入编辑
2.6)在最后一行加入 PATH=/usr/local/bin:$PATH
2.7)保存后覆盖回去/etc/profile,然后重新打开终端试下brew
3、装RVM
3.1)终端,输入
[objc]
curl -L https://get.rvm.io | bash -s stable
[/objc]
3.2)等待安装后,输入以下命令,载入 RVM 环境
[objc]
source ~/.rvm/scripts/rvm
[/objc]
3.3)查询下版本,看安装是否成功
[objc]
rvm -v
[/objc]
4、装Ruby
4.1)终端输入,列出Ruby版本
[objc]
rvm list known
[/objc]
4.2)以2.0.0为例,终端输入
[objc]
rvm install 2.0.0
[/objc]
4.3)人品好的话,一下就过完直接看4.4。人品不好出现错误,看最后面的内容。
4.4)安装完后,可以在终端输入以下命令,查看已经安装的Ruby
[objc]
rvm list
[/objc]
4.5)设置Ruby默认版本
[objc]
rvm 2.0.0 –default
[/objc]
5.5)将源替换成淘宝的【https://ruby.taobao.org/】,操作如下
[objc]
$ gem sources –add https://ruby.taobao.org/ –remove https://rubygems.org/
$ gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
# 请确保只有 ruby.taobao.org
$ gem install rails
[/objc]
——–分割线——–
人品不好的,出现错误已经解决方式:
错误一:Error running ‘requirements_osx_brew_update_system ruby-2.0.0-p643’
解决方式:
1、确认下你有Xcode和the Command Line Tools,以及Homebrew
错误二:Error running ‘requirements_osx_brew_libs_install autoconf automake libtool pkg-config libyaml readline libksba openssl’
解决方法:
1、先在终端输入
[objc]
brew install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl
[objc]
2、装完后输入[objc]rvm requirements[/objc]
错误三: brew install apple-gcc42 提示找不到之类的错误
解决方法:
1、终端输入[objc]brew install homebrew/dupes/apple-gcc42[/objc]
错误四:requirements_osx_brew_libs_install automake
解决方法:
1、终端输入[objc]brew install automake[/objc]
错误五:在执行brew install automake,提示You must `brew link autoconf` before automake can be installed
解决方法:
1、终端输入以下命令,{username}替换为当前系统用户名
[objc]
sudo chown -R {username} /usr/local
[/objc]
2、然后再执行brew link autoconf,之后如有错误按照提示操作即可。
错误六:用到gem,就提示bad interpreter: No such file or directory
主要原因:自己不小心改了用户名,导致路径错了。
解决方法:
1、终端输入以下命令
[objc]
brew update && brew install gmp && rvm reinstall 2.2.1
[/objc]
——–分割线——–
5、装CocoaPods
5.1)终端输入
[objc]sudo gem install cocoapods[/objc]
5.2)终端输入,看是否成功
[objc]pod –version [/objc]
相关链接,技术支持:
https://www.interworks.com/blog/ckaukis/2013/03/05/installing-ruby-200-rvm-and-homebrew-mac-os-x-108-mountain-lion
http://www.cnblogs.com/daguo/p/4097263.html
https://ruby.taobao.org/
http://stackoverflow.com/questions/15324590/rvm-install-ruby-1-9-3-missing-required-packages
http://stackoverflow.com/questions/16473115/error-running-requirements-osx-brew-libs-install-on-mac-10-7
http://stackoverflow.com/questions/16844826/error-when-trying-to-brew-link-autoconf/16844923
atorvastatin pills atorvastatin 10mg sale brand atorvastatin
how to buy ciprofloxacin – buy septra without a prescription buy amoxiclav pills
cipro buy online – cost augmentin 375mg buy augmentin without prescription
oral flagyl – order cleocin generic buy zithromax 250mg online cheap
buy ciprofloxacin 500 mg online – order generic ciplox 500 mg order erythromycin
purchase valtrex pill – valacyclovir 1000mg sale how to get acyclovir without a prescription
can you buy stromectol over the counter – cefuroxime brand order sumycin 250mg without prescription
buy metronidazole generic – buy cleocin 150mg online buy zithromax online
acillin drug purchase penicillin generic order amoxicillin pill
furosemide online buy – atacand 16mg cost buy captopril online cheap
glycomet where to buy – buy trimethoprim lincocin pill
purchase retrovir generic – order zyloprim pills
buy clozapine 50mg generic – order quinapril 10mg purchase famotidine sale
quetiapine 100mg canada – cost luvox 50mg cheap eskalith tablets
buy anafranil medication – order paroxetine 20mg for sale order sinequan 75mg generic
buy hydroxyzine 25mg online – cost buspirone 5mg how to buy endep
purchase amoxicillin online – buy amoxicillin pills baycip pills
how to get clindamycin without a prescription – order cleocin pill buy chloromycetin
zithromax 250mg over the counter – order tinidazole 500mg online ciplox 500 mg oral
ivermectin 12mg for people – ivermectina 6mg buy cefaclor generic
buy albuterol inhaler – buy seroflo online order theophylline 400mg generic
desloratadine 5mg over the counter – order generic zaditor albuterol inhaler
where to buy methylprednisolone without a prescription – cost astelin 10ml azelastine 10 ml usa
buy glyburide 2.5mg online cheap – order generic micronase 5mg buy dapagliflozin sale
buy prandin 2mg online – repaglinide cheap jardiance 25mg over the counter
glucophage online buy – buy acarbose without a prescription precose buy online
order terbinafine – cheap lamisil order grifulvin v online
semaglutide cheap – semaglutide 14mg over the counter DDAVP for sale online
cost ketoconazole – sporanox order online itraconazole 100mg without prescription
buy famvir 250mg pills – valcivir cheap purchase valcivir generic
order lanoxin 250 mg – cheap labetalol 100 mg buy furosemide 100mg pills
microzide us – hydrochlorothiazide 25mg sale bisoprolol uk
order lopressor generic – order generic micardis 20mg purchase adalat pill
purchase nitroglycerin for sale – buy combipres online valsartan 160mg uk
simvastatin bench – zocor order online atorvastatin inner
rosuvastatin online number – caduet fond caduet online italian
viagra professional online walk – viagra gold value levitra oral jelly online kid
priligy entertain – cialis with dapoxetine insult cialis with dapoxetine peace
cenforce prove – kamagra man brand viagra pills party
brand cialis poison – zhewitra eat penisole fever
cialis soft tabs pills pop – cialis super active online color1 viagra oral jelly online america
uti treatment anymore – uti treatment steward uti treatment thus
prostatitis pills frighten – pills for treat prostatitis superior prostatitis medications passion
valacyclovir pills thrust – valacyclovir pills wall valtrex pills above
claritin argue – loratadine medication stream claritin safe
loratadine medication instead – claritin pills tense loratadine servant
priligy nephew – dapoxetine thread priligy ear
promethazine trail – promethazine coil promethazine old
ascorbic acid funny – ascorbic acid grace ascorbic acid misery
biaxin pills drain – clarithromycin pills trail cytotec maid
florinef pills anger – prilosec pills heir lansoprazole rat
buy bisacodyl 5 mg without prescription – order liv52 online liv52 20mg canada
buy aciphex 20mg generic – motilium online order domperidone 10mg pill
bactrim canada – keppra 500mg cost tobramycin 5mg without prescription
eukroma order online – cerazette 0.075mg canada duphaston 10mg pill
forxiga 10mg pills – buy doxepin 25mg without prescription how to buy precose
fulvicin 250mg cheap – lopid pills gemfibrozil 300 mg usa
vasotec price – buy xalatan generic purchase zovirax online
dramamine 50 mg for sale – buy dramamine medication buy actonel 35mg for sale
piracetam sale – secnidazole 20mg generic sinemet generic
hydroxyurea oral – trental online methocarbamol where to buy
order cytoxan generic – stavudine for sale online buy vastarel
spironolactone without prescription – buy generic prothiaden buy revia 50 mg pill
flexeril cost – pill prasugrel 10 mg vasotec drug
order ondansetron 4mg online cheap – buy ropinirole pills for sale purchase requip pill
purchase durex gel – how to buy zovirax cheap latanoprost
order tenormin online cheap – clopidogrel ca purchase coreg sale
verapamil 120mg for sale – buy tenoretic without a prescription tenoretic medication
buy atorvastatin tablets – cost enalapril buy nebivolol 20mg without prescription
purchase gasex without prescription – purchase ashwagandha pills purchase diabecon online cheap
lasuna over the counter – diarex price how to buy himcolin
buy finasteride medication – buy generic finax for sale alfuzosin 10 mg uk