gpt4 book ai didi

cocoapods - 在处理预安装 Hook 时安装特定的 CocoaPod - 'no such file'

转载 作者:行者123 更新时间:2023-12-02 01:52:28 25 4
gpt4 key购买 nike

我在带有 CocoaPods 的 Mac OS X 10.9.1 上安装了 MapBox,但我遇到了链接问题,MapBox 的人建议我直接从他们存档中的标签下载。不幸的是,我无法加载该标签。

这是我的 Podfile 和他们的建议:

platform :ios, '7.0'
pod 'AFNetworking', '~> 2.0'
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk', :tag => '1.1.0'
pod 'TWTSideMenuViewController', '~> 0.3'

CocoaPods 在 pod 'Mapbox' 行上收到错误(见下文)。好像找不到目录。我试过:

  • 获取特定的 :commit 以查看它是否是该标记(否)
  • 将目录名称更改为仅包含字母字符(没有帮助)
  • 更改 Pod 目录以允许所有人写入(没有帮助)
  • 使用 sudo gem uninstall cocoapods、sudo gem install cocoapods 重新安装 CocoaPods(我又得到了 0.29.0,但没有帮助获取标签源)

为什么预安装 Hook 无法找到(或创建?)该目录?

这是“pod install”的输出:

[!] An error occurred while processing the pre-install hook of Mapbox (1.1.0).

No such file or directory - /Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Mapbox

/Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Local Podspecs/Mapbox.podspec:25:in `chdir'
/Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Local Podspecs/Mapbox.podspec:25:in `block (2 levels) in _eval_podspec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:406:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:406:in `pre_install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:489:in `run_spec_pre_install_hook'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:464:in `block (3 levels) in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:462:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:462:in `block (2 levels) in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:460:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:460:in `block in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:113:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:459:in `run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:104:in `block in download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:52:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:101:in `download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:87:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:38:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:68:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:213:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'

谢谢,鲍勃

最佳答案

如果您之前安装过 Mapbox,请先将其卸载。然后重新安装。

  1. 删除或注释 Podfile 中的这一行
    pod 'MapBox', '~> 1.1.0'
  2. 运行命令
    pods 安装
    这将删除 Mapbox 及其所有依赖项。

  3. 将 Mapbox 放回 Podfile
    pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk.git', :branch => '开发'

  4. 再次运行pod install

对我有帮助

关于cocoapods - 在处理预安装 Hook 时安装特定的 CocoaPod - 'no such file',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21882616/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com