安裝cocoa pods時出現Operation not permitted - /usr/bin/xcodeproj的問題

在更新完ruby冒掌,更換Ruby鏡像--淘寶的那個鏡像(https://ruby.taobao.org/ )已經不可用了因宇。官方的需要FQ晃琳。所以我們現在用最新支持的ruby鏡像(https://gems.ruby-china.org/)

安裝cocoa pods時撬即,

在命令行中輸入:

安裝:sudo gem install cocoapods報Operation not permitted - /usr/bin/xcodeproj這個錯誤,解決辦法為:

sudo?gem?install?-n?/usr/local/bin?cocoapods?--pre

這段命令代替

sudo gem installcocoa pods

就完美解決了

安裝cocoapods的步驟為:

1告丢、更新ruby

sudo gem update --system

2、

更換Ruby鏡像--淘寶的那個鏡像(https://ruby.taobao.org/?)已經不可用了损谦。官方的需要FQ岖免。所以我們現在用最新支持的ruby鏡像(https://gems.ruby-china.org/)

需要的命令行:

gem sources --remove https://rubygems.org/

gem sources -a https://gems.ruby-china.org/

gem sources -l ?(用來檢查使用替換鏡像位置成功)

出現

*** CURRENT SOURCES ***

https://gems.ruby-china.org/

則說明成功了

3、安裝cocoapods ?命令行:sudo?gem?install?-n?/usr/local/bin?cocoapods?--pre

終端打诱占瘛:

MacintoshdeiMac:~ Mac$ sudo gem install -n /usr/local/bin cocoapods --pre

ERROR:? SSL verification error at depth 1: unable to get local issuer certificate (20)

ERROR:? You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store

ERROR:? SSL verification error at depth 2: self signed certificate in certificate chain (19)

ERROR:? Root certificate is not trusted (/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA)

Successfully installed xcodeproj-1.4.2

Fetching: ruby-macho-0.2.6.gem (100%)

Successfully installed ruby-macho-0.2.6

Fetching: nap-1.1.0.gem (100%)

Successfully installed nap-1.1.0

Fetching: molinillo-0.5.4.gem (100%)

Successfully installed molinillo-0.5.4

Fetching: gh_inspector-1.0.2.gem (100%)

Successfully installed gh_inspector-1.0.2

Fetching: fourflusher-2.0.1.gem (100%)

Successfully installed fourflusher-2.0.1

Fetching: escape-0.0.4.gem (100%)

Successfully installed escape-0.0.4

Fetching: cocoapods-try-1.1.0.gem (100%)

Successfully installed cocoapods-try-1.1.0

Fetching: netrc-0.7.8.gem (100%)

Successfully installed netrc-0.7.8

Fetching: cocoapods-trunk-1.1.2.gem (100%)

Successfully installed cocoapods-trunk-1.1.2

Fetching: cocoapods-stats-1.0.0.gem (100%)

Successfully installed cocoapods-stats-1.0.0

Fetching: cocoapods-search-1.0.0.gem (100%)

Successfully installed cocoapods-search-1.0.0

Fetching: cocoapods-plugins-1.0.0.gem (100%)

Successfully installed cocoapods-plugins-1.0.0

Fetching: cocoapods-downloader-1.1.3.gem (100%)

Successfully installed cocoapods-downloader-1.1.3

Fetching: cocoapods-deintegrate-1.0.1.gem (100%)

Successfully installed cocoapods-deintegrate-1.0.1

Fetching: fuzzy_match-2.0.4.gem (100%)

Successfully installed fuzzy_match-2.0.4

Fetching: cocoapods-core-1.2.0.beta.1.gem (100%)

Successfully installed cocoapods-core-1.2.0.beta.1

Fetching: cocoapods-1.2.0.beta.1.gem (100%)

Successfully installed cocoapods-1.2.0.beta.1

Parsing documentation for xcodeproj-1.4.2

Installing ri documentation for xcodeproj-1.4.2

Parsing documentation for ruby-macho-0.2.6

Installing ri documentation for ruby-macho-0.2.6

Parsing documentation for nap-1.1.0

Installing ri documentation for nap-1.1.0

Parsing documentation for molinillo-0.5.4

Installing ri documentation for molinillo-0.5.4

Parsing documentation for gh_inspector-1.0.2

Installing ri documentation for gh_inspector-1.0.2

Parsing documentation for fourflusher-2.0.1

Installing ri documentation for fourflusher-2.0.1

Parsing documentation for escape-0.0.4

Installing ri documentation for escape-0.0.4

Parsing documentation for cocoapods-try-1.1.0

Installing ri documentation for cocoapods-try-1.1.0

Parsing documentation for netrc-0.7.8

Installing ri documentation for netrc-0.7.8

Parsing documentation for cocoapods-trunk-1.1.2

Installing ri documentation for cocoapods-trunk-1.1.2

Parsing documentation for cocoapods-stats-1.0.0

Installing ri documentation for cocoapods-stats-1.0.0

Parsing documentation for cocoapods-search-1.0.0

Installing ri documentation for cocoapods-search-1.0.0

Parsing documentation for cocoapods-plugins-1.0.0

Installing ri documentation for cocoapods-plugins-1.0.0

Parsing documentation for cocoapods-downloader-1.1.3

Installing ri documentation for cocoapods-downloader-1.1.3

Parsing documentation for cocoapods-deintegrate-1.0.1

Installing ri documentation for cocoapods-deintegrate-1.0.1

Parsing documentation for fuzzy_match-2.0.4

Installing ri documentation for fuzzy_match-2.0.4

Parsing documentation for cocoapods-core-1.2.0.beta.1

Installing ri documentation for cocoapods-core-1.2.0.beta.1

Parsing documentation for cocoapods-1.2.0.beta.1

Installing ri documentation for cocoapods-1.2.0.beta.1

18 gems installed

到此安裝成功颅湘!

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市栗精,隨后出現的幾起案子闯参,更是在濱河造成了極大的恐慌,老刑警劉巖悲立,帶你破解...
    沈念sama閱讀 218,682評論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件鹿寨,死亡現場離奇詭異,居然都是意外死亡级历,警方通過查閱死者的電腦和手機释移,發(fā)現死者居然都...
    沈念sama閱讀 93,277評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來寥殖,“玉大人玩讳,你說我怎么就攤上這事涩蜘。” “怎么了熏纯?”我有些...
    開封第一講書人閱讀 165,083評論 0 355
  • 文/不壞的土叔 我叫張陵同诫,是天一觀的道長。 經常有香客問我樟澜,道長误窖,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,763評論 1 295
  • 正文 為了忘掉前任秩贰,我火速辦了婚禮霹俺,結果婚禮上,老公的妹妹穿的比我還像新娘毒费。我一直安慰自己丙唧,他們只是感情好,可當我...
    茶點故事閱讀 67,785評論 6 392
  • 文/花漫 我一把揭開白布觅玻。 她就那樣靜靜地躺著想际,像睡著了一般。 火紅的嫁衣襯著肌膚如雪溪厘。 梳的紋絲不亂的頭發(fā)上胡本,一...
    開封第一講書人閱讀 51,624評論 1 305
  • 那天,我揣著相機與錄音畸悬,去河邊找鬼侧甫。 笑死,一個胖子當著我的面吹牛傻昙,可吹牛的內容都是我干的闺骚。 我是一名探鬼主播,決...
    沈念sama閱讀 40,358評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼妆档,長吁一口氣:“原來是場噩夢啊……” “哼僻爽!你這毒婦竟也來了?” 一聲冷哼從身側響起贾惦,我...
    開封第一講書人閱讀 39,261評論 0 276
  • 序言:老撾萬榮一對情侶失蹤胸梆,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后须板,有當地人在樹林里發(fā)現了一具尸體碰镜,經...
    沈念sama閱讀 45,722評論 1 315
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 37,900評論 3 336
  • 正文 我和宋清朗相戀三年习瑰,在試婚紗的時候發(fā)現自己被綠了绪颖。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,030評論 1 350
  • 序言:一個原本活蹦亂跳的男人離奇死亡甜奄,死狀恐怖柠横,靈堂內的尸體忽然破棺而出窃款,到底是詐尸還是另有隱情,我是刑警寧澤牍氛,帶...
    沈念sama閱讀 35,737評論 5 346
  • 正文 年R本政府宣布晨继,位于F島的核電站,受9級特大地震影響搬俊,放射性物質發(fā)生泄漏紊扬。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,360評論 3 330
  • 文/蒙蒙 一唉擂、第九天 我趴在偏房一處隱蔽的房頂上張望餐屎。 院中可真熱鬧,春花似錦玩祟、人聲如沸啤挎。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,941評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至胜臊,卻和暖如春勺卢,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背象对。 一陣腳步聲響...
    開封第一講書人閱讀 33,057評論 1 270
  • 我被黑心中介騙來泰國打工黑忱, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人勒魔。 一個月前我還...
    沈念sama閱讀 48,237評論 3 371
  • 正文 我出身青樓甫煞,卻偏偏與公主長得像,于是被迫代替她去往敵國和親冠绢。 傳聞我的和親對象是個殘疾皇子抚吠,可洞房花燭夜當晚...
    茶點故事閱讀 44,976評論 2 355

推薦閱讀更多精彩內容