執(zhí)行pod更新活安裝時(shí)報(bào)錯(cuò)
sudo gem install -n /usr/local/bin cocoapods
image.png
- 安裝 rvm
curl -L https://get.rvm.io | bash -s stable
如果可以安裝成功并出現(xiàn)下列的提示則可以直接進(jìn)行第二步
Upgrade of RVM in /Users/mengshun/.rvm/ is complete.
Thanks for installing RVM ??
Please consider donating to our open collective to help us maintain RVM.
?? Donate: https://opencollective.com/rvm/donate
如果失敗, 出現(xiàn)了下方的錯(cuò)誤(報(bào)錯(cuò)內(nèi)容 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out)
? Ruby: curl -L https://get.rvm.io | bash -s stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 194 100 194 0 0 166 0 0:00:01 0:00:01 --:--:-- 166
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- 執(zhí)行下列的指令
sudo gem install redis
- 然后繼續(xù)執(zhí)行rvm的安裝命令 (
curl -L https://get.rvm.io | bash -s stable)
如果還是報(bào) 443 錯(cuò)誤, 那就等一會(huì)再執(zhí)行或者換另一種方法
問(wèn)題記錄_安裝cocoaPods失敗【提示:ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.】
問(wèn)題:
安裝cocoaPods失敗
sudo gem install cocoapod
報(bào)錯(cuò):【提示:ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.】
百度發(fā)現(xiàn)可能ruby版本問(wèn)題
rvm -v
報(bào)錯(cuò):-bash: rvm: command not found
安裝ruby:
\curl -sSL [https://get.rvm.io](https://get.rvm.io/) | bash -s stable --ruby
報(bào)錯(cuò):
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
解決:
1.通過(guò)地址https://blog.csdn.net/qq_43531694/article/details/106862753
方式一解決ruby安裝問(wèn)題完成安裝
會(huì)自動(dòng)裝上最新版惰聂。更新RVM版本:$ rvm get stable
載入RVM環(huán)境
source ~/.rvm/scripts/rvm
2宠漩、安裝Ruby
列出ruby可安裝的版本
rvm list known
rvm install ruby-2.6
3、設(shè)置Ruby版本
設(shè)置默認(rèn)版本
rvm 2.5.3 --default
sudo gem install -n /usr/local/bin cocoapods
Password:
Fetching concurrent-ruby-1.1.8.gem
Fetching i18n-1.8.10.gem
Fetching thread_safe-0.3.6.gem
Fetching tzinfo-1.2.9.gem
Fetching activesupport-5.2.6.gem
Fetching fuzzy_match-2.0.4.gem
Fetching nap-1.1.0.gem
Fetching httpclient-2.8.3.gem
Fetching ffi-1.15.1.gem
Fetching ethon-0.14.0.gem
Fetching typhoeus-1.4.0.gem
Fetching netrc-0.11.0.gem
Fetching public_suffix-4.0.6.gem
Fetching addressable-2.7.0.gem
Fetching cocoapods-core-1.10.1.gem
Fetching algoliasearch-1.27.5.gem
Fetching claide-1.0.3.gem
Fetching cocoapods-deintegrate-1.0.4.gem
Fetching cocoapods-downloader-1.4.0.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching cocoapods-search-1.0.0.gem
Fetching cocoapods-trunk-1.5.0.gem
Fetching cocoapods-try-1.2.0.gem
Fetching molinillo-0.6.6.gem
Fetching atomos-0.1.3.gem
Fetching colored2-3.1.2.gem
Fetching nanaimo-0.3.0.gem
Fetching xcodeproj-1.19.0.gem
Fetching escape-0.0.4.gem
Fetching fourflusher-2.3.1.gem
Fetching gh_inspector-1.1.3.gem
Fetching ruby-macho-1.4.0.gem
Fetching CFPropertyList-3.0.3.gem
Fetching cocoapods-1.10.1.gem
Successfully installed concurrent-ruby-1.1.8
Successfully installed i18n-1.8.10
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.9
Successfully installed activesupport-5.2.6
Successfully installed nap-1.1.0
Successfully installed fuzzy_match-2.0.4
Successfully installed httpclient-2.8.3
A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features.
Successfully installed algoliasearch-1.27.5
Building native extensions. This could take a while...
Successfully installed ffi-1.15.1
Successfully installed ethon-0.14.0
Successfully installed typhoeus-1.4.0
Successfully installed netrc-0.11.0
Successfully installed public_suffix-4.0.6
Successfully installed addressable-2.7.0
Successfully installed cocoapods-core-1.10.1
Successfully installed claide-1.0.3
Successfully installed cocoapods-deintegrate-1.0.4
Successfully installed cocoapods-downloader-1.4.0
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-search-1.0.0
Successfully installed cocoapods-trunk-1.5.0
Successfully installed cocoapods-try-1.2.0
Successfully installed molinillo-0.6.6
Successfully installed atomos-0.1.3
Successfully installed CFPropertyList-3.0.3
Successfully installed colored2-3.1.2
Successfully installed nanaimo-0.3.0
Successfully installed xcodeproj-1.19.0
Successfully installed escape-0.0.4
Successfully installed fourflusher-2.3.1
Successfully installed gh_inspector-1.1.3
Successfully installed ruby-macho-1.4.0
Successfully installed cocoapods-1.10.1
Parsing documentation for concurrent-ruby-1.1.8
Installing ri documentation for concurrent-ruby-1.1.8
Parsing documentation for i18n-1.8.10
Installing ri documentation for i18n-1.8.10
Parsing documentation for thread_safe-0.3.6
Installing ri documentation for thread_safe-0.3.6
Parsing documentation for tzinfo-1.2.9
Installing ri documentation for tzinfo-1.2.9
Parsing documentation for activesupport-5.2.6
Installing ri documentation for activesupport-5.2.6
Parsing documentation for nap-1.1.0
Installing ri documentation for nap-1.1.0
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for httpclient-2.8.3
Installing ri documentation for httpclient-2.8.3
Parsing documentation for algoliasearch-1.27.5
Installing ri documentation for algoliasearch-1.27.5
Parsing documentation for ffi-1.15.1
Installing ri documentation for ffi-1.15.1
Parsing documentation for ethon-0.14.0
Installing ri documentation for ethon-0.14.0
Parsing documentation for typhoeus-1.4.0
Installing ri documentation for typhoeus-1.4.0
Parsing documentation for netrc-0.11.0
Installing ri documentation for netrc-0.11.0
Parsing documentation for public_suffix-4.0.6
Installing ri documentation for public_suffix-4.0.6
Parsing documentation for addressable-2.7.0
Installing ri documentation for addressable-2.7.0
Parsing documentation for cocoapods-core-1.10.1
Installing ri documentation for cocoapods-core-1.10.1
Parsing documentation for claide-1.0.3
Installing ri documentation for claide-1.0.3
Parsing documentation for cocoapods-deintegrate-1.0.4
Installing ri documentation for cocoapods-deintegrate-1.0.4
Parsing documentation for cocoapods-downloader-1.4.0
Installing ri documentation for cocoapods-downloader-1.4.0
Parsing documentation for cocoapods-plugins-1.0.0
Installing ri documentation for cocoapods-plugins-1.0.0
Parsing documentation for cocoapods-search-1.0.0
Installing ri documentation for cocoapods-search-1.0.0
Parsing documentation for cocoapods-trunk-1.5.0
Installing ri documentation for cocoapods-trunk-1.5.0
Parsing documentation for cocoapods-try-1.2.0
Installing ri documentation for cocoapods-try-1.2.0
Parsing documentation for molinillo-0.6.6
Installing ri documentation for molinillo-0.6.6
Parsing documentation for atomos-0.1.3
Installing ri documentation for atomos-0.1.3
Parsing documentation for CFPropertyList-3.0.3
Installing ri documentation for CFPropertyList-3.0.3
Parsing documentation for colored2-3.1.2
Installing ri documentation for colored2-3.1.2
Parsing documentation for nanaimo-0.3.0
Installing ri documentation for nanaimo-0.3.0
Parsing documentation for xcodeproj-1.19.0
Installing ri documentation for xcodeproj-1.19.0
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for fourflusher-2.3.1
Installing ri documentation for fourflusher-2.3.1
Parsing documentation for gh_inspector-1.1.3
Installing ri documentation for gh_inspector-1.1.3
Parsing documentation for ruby-macho-1.4.0
Installing ri documentation for ruby-macho-1.4.0
Parsing documentation for cocoapods-1.10.1
Installing ri documentation for cocoapods-1.10.1
Done installing documentation for concurrent-ruby, i18n, thread_safe, tzinfo, activesupport, nap, fuzzy_match, httpclient, algoliasearch, ffi, ethon, typhoeus, netrc, public_suffix, addressable, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-trunk, cocoapods-try, molinillo, atomos, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 39 seconds
34 gems installed
~~~~:~ linmac$ pod --version
1.10.1
~~~~:~ linmac$