我在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
答案 0 :(得分:0)
安装POD
的步骤:-
pod 'Alamofire'
答案 1 :(得分:0)
您是否尝试过上述说明?
进入您的终端,然后:
cd /Users/myUser/.cocoapods/repos
其次:
pod repo add https://github.com/CocoaPods/Specs.git master-1
答案 2 :(得分:0)
尝试以下命令。
pod update YourPodName
您的PodName 与您的Pod名称保持一致。
示例:-pod update Alamofire