在项目目录中执行pod install
后,遇到OpenSSL::SSL::SSLError - SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
错误。
Google了各种方法,始终没能解决这个问题。
所以就尝试了把cocoapods更新到1.0.0-beta4版本,然而问题依旧。
cocoapods的完整输出如下:
/usr/local/bin/pod install
What did you do?
What did you expect to happen?
What happened instead?
CocoaPods : 0.39.0
Ruby : ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
RubyGems : 2.0.14
Host : Mac OS X 10.11.3 (15D21)
Xcode : 7.2.1 (7C1002)
Git : git version 2.5.4 (Apple Git-61)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://gitcafe.com/akuandev/Specs.git @ cf02a93f9c0189ec3343103a068d45c2c60780fc
master-1 - https://github.com/CocoaPods/Specs.git @ 7842de006bbab20edac067bc8a768049c61ec472
cocoapods-plugins : 0.4.2
cocoapods-search : 0.1.0
cocoapods-stats : 0.6.2
cocoapods-trunk : 0.6.4
cocoapods-try : 0.5.1
platform :ios, '7.0'
pod "AFNetworking", '~> 2.6.3'
pod "MWFeedParser"
pod 'MBProgressHUD', '~> 0.8'
pod 'Evernote-SDK-iOS', '~> 1.3.1'
pod 'ViewUtils'
pod 'MMLayershots', :podspec => 'https://raw.githubusercontent.com/vpdn/MMLayershots/master/MMLayershots.podspec'
pod 'RMSwipeTableViewCell'
pod 'RETableViewManager', '~> 1.5.10'
pod 'PAPreferences'
pod 'SDWebImage'
pod 'Masonry'
pod 'MJRefresh'
pod 'JSONModel'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
OpenSSL::SSL::SSLError - SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:921:in `connect'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:921:in `block in connect'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:921:in `connect'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:851:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:313:in `open_http'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:709:in `buffer_open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:689:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:34:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/external_sources/podspec_source.rb:19:in `block in fetch'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:80:in `titled_section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/external_sources/podspec_source.rb:11:in `fetch'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:457:in `fetch_external_source'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:434:in `block (2 levels) in fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:433:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:433:in `block in fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:432:in `fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:69:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:213:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:136:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:135:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:105:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
gem用的是淘宝的源。
问题已经解决。问题处在Podfile
中,将Podfile
中pod 'MMLayershots', :podspec => 'https://raw.githubusercontent.com/vpdn/MMLayershots/master/MMLayershots.podspec'
这行代码从逗号往后的内容去掉就解决了。
Adakah sumber Taobao digunakan
https://ruby.taobao.org/
?Ini nampaknya menjadi masalah sejak dahulu lagi. Mesej ralat adalah serupa dengan mesej anda, tetapi ia telah ditutup https://github.com/CocoaPods/CocoaPods/pull/2073Jika ralat SSL dilaporkan, semak dahulu sama ada proksi digunakan.
Jika itu tidak berjaya, anda boleh cuba memasang CocoaPods dalam direktori pengguna (daripada dokumentasi rasmi tanpa pemasangan sudo), dan mengekalkan sumber Taobao yang ditetapkan sebelum ini:
Tambah konfigurasi berikut- (jika anda menggunakan bash)
~/.bashrc
Pemasangan-
Ini mungkin tidak berkesan, tetapi anda boleh menguji sama ada masalah itu disebabkan oleh CocoaPods tidak dipasang dengan betul. Di samping itu, CocoaPods telah dinaik taraf kali terakhir, dan Podfile diperiksa dengan lebih ketat, yang mungkin juga menjadi sebab untuk ralat kemas kini.