【发布时间】:2019-04-25 05:56:49
【问题描述】:
我在 OS X 10.9.5 上使用 xcode 6.2
我已经安装了 ruby v2.6.3p62 和 pod v1.6.1, 并且已经克隆了 .cocoapods/repos/master,
在我的项目目录中运行命令之后:
pod init
创建 Podfile 并将“pod 'Alamofire'”添加到文件中以添加依赖项
但是,当我运行命令时:
pod install
我收到了这条消息:
Analyzing dependencies
env: illegal option -- u
usage: env [-i] [name=value ...] [utility [argument ...]]
Setting up CocoaPods master repo
[i] Unable to add a source with url 'https://github.com/CocoaPods/Specs.git'named 'master-1.
You can try adding it manually in '/Users/myUser/.cocoapods/repos'or via 'pod repo add'.
我已尝试删除并重新克隆 .cocoapods/repos/master,
将 Xcode 中的命令行工具更改为 Xcode 6.2 或设置为空,
但这并没有解决问题。
更新
这是我的 Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '8.0'
target 'MyProject' do
# Comment the next line if you're not using Swift and don't want to use dynimic frameworks
use_frameworks!
# Pods for MyProject
pod 'Alamofire'
end
【问题讨论】:
-
你必须更新你的 pod。
-
向我们展示您的
Podfile -
嗨@sn86 ,更新吊舱是什么意思?你的意思是使用'pod update'吗?不幸的是,“pod update”的问题仍然相同
-
@MatthewK 请检查我的答案。
-
嗨@ChanakaCaldera,我已经用 Podfile 编辑了我的问题