CocoaPods / CocoaPods

The Cocoa Dependency Manager.
https://cocoapods.org/
Other
14.57k stars 2.63k forks source link

pod报错 #11824

Open wyngyj opened 1 year ago

wyngyj commented 1 year ago

pod install /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin22/rbconfig.rb:21: warning: Insecure world writable dir /opt/homebrew in PATH, mode 040777 [!] No `Podfile' found in the project directory. wuyanan@bogon manors-client-ios % cd Manor wuyanan@bogon Manor % pod install /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin22/rbconfig.rb:21: warning: Insecure world writable dir /opt/homebrew in PATH, mode 040777 Analyzing dependencies

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/usr/local/bin/pod install

Report

Stack

   CocoaPods : 1.12.0
        Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
    RubyGems : 3.0.3.1
        Host : macOS 13.0 (22A380)
       Xcode : 14.2 (14C18)
         Git : git version 2.37.1 (Apple Git-137.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

# Uncomment the next line to define a global platform for your project
 platform :ios, '12.0'
 install! 'cocoapods', :disable_input_output_paths => true

def all_pods
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  #pod 'FFModuleManager', :path => '../Modules/FFModuleManager'
  #pod 'FFTools', :path => '../Modules/FFTools'

  #https://manors.sit.shanhai.team/static/shdl/

  # SDK
  pod 'JCore'
  pod 'JPush'
  pod 'JShare'
  pod 'JAnalytics'
  pod 'JVerification'
  pod 'XinstallSDK'

  # 3D地图与2D地图不能同时使用
#  pod 'AMap3DMap-NO-IDFA' # 3D地图SDK
#  pod 'AMap2DMap-NO-IDFA' # 2D地图SDK
#  pod 'AMapSearch-NO-IDFA' # 搜索功能
#  pod 'AMapLocation-NO-IDFA' # 定位SDK
#  pod 'AMapNavi-NO-IDFA' # 导航SDK

  # Swift Library
  pod 'Alamofire'
  pod 'SnapKit'
  pod 'SwiftyJSON'
  pod 'Kingfisher', '~> 7.0'
  pod 'IQKeyboardManagerSwift'
  pod 'JXSegmentedView'
  pod 'JXPagingView/Paging'
  pod 'HandyJSON'
  pod "ESTabBarController-swift"
  pod 'SwiftEntryKit'

  # 需保留
  pod 'MJRefresh', '~> 3.5.0'
  pod 'MBProgressHUD'
  pod 'lottie-ios', '~> 2.5.3'
  pod 'FDFullscreenPopGesture'
  pod "RTRootNavigationController"
  pod 'YYModel'
  pod 'YYText', '~> 1.0.7'
  pod 'YYCategories', '~> 1.0.4'
  pod 'FLAnimatedImage'
  pod 'TZImagePickerController'
  pod 'ActiveLabel'
  pod 'CHTCollectionViewWaterfallLayout'

  # TODO - 后期可被替换
  pod 'AFNetworking', '~> 4.0.1'
  pod 'SDWebImage','5.12.0'
  pod 'Masonry'
  pod 'IQKeyboardManager'

  pod 'SDCycleScrollView','>= 1.82'
  pod 'ReactiveObjC'
  pod 'CRBoxInputView'
  pod "AlignedCollectionViewFlowLayout"

  # 移除1
  pod 'LBXScan/LBXNative','~> 2.5'
  pod 'LBXZBarSDK','~> 1.3'
  pod 'LBXScan/UI','~> 2.5'
  # 移除2
  pod 'BRPickerView'

end

def pod_local(type)
  pod "TXLiteAVSDK_#{type}"
  pod "TUICore", :path => "../Development_Pods/TUICore"
  pod "TUIBeauty", :path => "../Development_Pods/TUIBeauty"
  loadLocalTUIComponent('TUIPusher', type)
  loadLocalTUIComponent('TUIPlayer', type)

  loadLocalTUIWidgetWithSubspec('TUIAudioEffect', type)
  loadLocalTUIWidget('TUIBarrage')
  loadLocalTUIWidget('TUIGift')

end

def loadLocalTUIComponent(name, type)
  pod "#{name}/#{type}", :path => "../Development_Pods/#{name}/"
end

def loadLocalTUIWidget(name)
  pod "#{name}", :path => "../Development_Pods/#{name}/"
end

def loadLocalTUIWidgetWithSubspec(name, type)
  pod "#{name}/#{type}", :path => "../Development_Pods/#{name}/"
end

target 'Manor' do
    all_pods
    pod_local('Professional')
end

target 'Manor-Test' do
    all_pods
    pod_local('Professional')
end

#  pod 'ZYCornerRadius'
#  pod 'SVProgressHUD'
#  pod 'LYEmptyView'
#  pod 'FCUUID'
#  pod 'LEEAlert'
#  pod 'JMessage'
#  pod 'YYModel', '~> 1.0.4'
#  pod 'LookinServer', :configurations => ['Debug']
#  pod 'HWPanModal', '~> 0.6.0'
#  pod 'CYLTabBarController', '~> 1.29.2'
#  pod 'CYLTabBarController', '~> 1.24.1'        # [CN]默认不依赖Lottie [EN]Do not depend on lottie by default
#  pod 'CYLTabBarController/Lottie', '~> 1.24.1' # [CN]依赖Lottie库 [EN] Depend on lottie
#  pod 'OCBarrage'

Error

JSON::ParserError - Failed to parse JSON at file: '/Users/wuyanan/.cocoapods/repos/trunk/Specs/1/1/7/SDWebImage/5.12.0/SDWebImage.podspec.json'.

416: unexpected token at '{
      "name": "MapKit",
      "platforms": {
        "osx": "10.11",
        "ios": "9.0",
        "tvos": "9.0"
      },
      "source_files": "SDWebImageMapKit/MapKit/'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/specification/json.rb:66:in `rescue in from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/specification.rb:752:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/specification.rb:726:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.12.0/lib/cocoapods-core/source.rb:188:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/delegate.rb:348:in `block in delegating_block'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/delegate.rb:349:in `block in delegating_block'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/resolver.rb:178:in `dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:18:in `block in dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:17:in `dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:809:in `block in group_possibilities'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:808:in `reverse_each'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:808:in `group_possibilities'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:779:in `possibilities_for_requirement'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:761:in `push_state_for_requirements'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:422:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/installer.rb:162:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=Failed+to+parse+JSON+at+file%3A+%27%2FUsers%2Fwuyanan%2F.cocoapods%2Frepos%2Ftrunk%2FSpecs%2F1%2F1%2F7%2FSDWebImage%2F5.12.0%2FSDWebImage.podspec.json%27.%0A%0A416%3A+unexpected+token+at+%27%7B%0A++++++%22name%22%3A+%22MapKit%22%2C%0A++++++%22platforms%22%3A+%7B%0A++++++++%22osx%22%3A+%2210.11%22%2C%0A++++++++%22ios%22%3A+%229.0%22%2C%0A++++++++%22tvos%22%3A+%229.0%22%0A++++++%7D%2C%0A++++++%22source_files%22%3A+%22SDWebImageMapKit%2FMapKit%2F%27&type=Issues

If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods... Searching for inspections failed: undefined method `map' for nil:NilClass wuyanan@bogon Manor %

Ayansa-Alemu commented 1 year ago

I am having the same problem and been stuck on a project for a while have you figured it out ?

zhaochao89 commented 1 year ago

添加 source 'https://github.com/CocoaPods/Specs.git',然后重新执行pod install,这样在我这边解决了。

zahid502 commented 1 year ago

@Ayansa-Alemu @wyngyj This error occurred due to cocapods caches, in some case our pods are caches with our previous projects. So clear the caches of cocapods and reinstall it. It will worked.

to clear the cocapods, this article will help you Clear CocoaPods cache, re-download and re-install all pods

during clear cocapods, if you get permission denied issue then follow this article cocoapods-pod-install-permission-denied

suwen-ux commented 1 week ago

添加 source 'https://github.com/CocoaPods/Specs.git',然后重新执行pod install,这样在我这边解决了。

你好,這是怎麽做到的,能説的詳細點嗎,我也遇到了這樣的問題