ios - sierra無法安裝 - 無法下載安裝程式資訊到目標卷宗




無法去工作可可豆和優勝美地 (4)

如果其他人遇到同樣的問題,我這樣做是為了解決我的問題:

  1. 更新寶石

    sudo gem update --system

  2. 卸載xcodeproj

    sudo gem uninstall xcodeproj

  3. 確保選擇所有版本

  4. 卸載Cocoapods

    sudo gem uninstall cocoapods

  5. 安裝xcodeproj

    sudo gem install xcodeproj

  6. 安裝cocoapods

    sudo gem install cocoapods

  7. pod --version to test.

我已經試過這個步驟:

  1. 打開Xcode 6打開首選項
  2. 點擊地點標籤
  3. 將命令行工具版本更改為Xcode 6.0
  4. 卸載cocoapods
  5. 一個。 $ sudo gem卸載cocoapods安裝xcodeproj
  6. 一個。 $ sudo gem install
  7. xcodeproj安裝cocoapods
  8. 一個。 $ sudo gem安裝cocoapods
  9. 運行pod --version來驗證它是否有效

但是當我做pod安裝或者pod --version的時候,我還是得到了這個:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:3:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj.rb:30:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods.rb:2:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/bin/pod:32:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

錯誤'require': cannot load such file表明你有些遺漏或破碎的gem包。 你可以通過重新安裝cocoapods來修復它:

gem uninstall cocoapods # Follow by sudo if necessary
gem install cocoapods --verbose # Follow by sudo if necessary

並確保您的xcodeproj存在:

gem install xcodeproj --verbose # Follow by sudo if necessary

如果沒有幫助,請嘗試使用較舊的Ruby進行安裝:

sudo ln -s /Library/Ruby/Gems/1.8/gems/rubygems-update-1.8.12/bin/gem /usr/bin/gem18
sudo gem18 install cocoapods

看到:


運行這兩行將解決您的問題

sudo gem更新 - 系統

sudo gem安裝cocoapods


這個問題很多是因為全系統的ruby安裝,並且迫使開發者一直使用“sudo”(好,我們做了多少次“ sudo gem install cocoapods --pre”)。 我最近有同樣的問題,試圖安裝cocoapods的預發布版本(權限被搞砸了)。 所以這是一個接近我的工作。

$ sudo gem uninstall xcodeproj 
$ sudo gem uninstall cocoapods

# Let's restore Apple's ruby installation, the following is for Yosemite that has 2.0 ruby by default 
$ cd /System/Library/Frameworks/Ruby.framework/Versions
$ sudo rm Current
$ sudo ln -s 2.0 Current 
$ brew install ruby

(關閉和打開終端窗口有時幫助)

$ which ruby

應該顯示/ usr / local / bin / ruby (現在應該指向“local”目錄,而不是“/ usr / bin”,如果不是這樣的話,一定要修改路徑順序)

現在你應該可以在不使用“sudo”的情況下安裝xcodeproj和cocoapods:

$ gem install xcodeproj --pre
$ gem install cocoapods --pre

(我正在使用預發行版本,只是刪除--pre如果你想使用發行版)。

請享用 :)





xcode6