【发布时间】:2014-01-13 09:43:32
【问题描述】:
我使用 cocoapods 已经有一段时间了,它工作得非常好,但是今天我在为我的项目安装 pod 文件时遇到了问题。我在终端运行安装命令,它似乎无限期挂起。
这里是详细日志:
Analyzing dependencies
Updating spec repositories
Updating spec repo `master`
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/executable.rb:55: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/user_interface.rb:277: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
$ /usr/bin/git pull
Already up-to-date.
CocoaPods 0.29.0 is available.
Downloading dependencies
-> Installing AFNetworking (2.0.3)
> GitHub download
> Creating cache git repo (/Users/abdsaniabdjalal/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7)
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/executable.rb:55: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/user_interface.rb:277: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
$ /usr/bin/git clone --mirror "https://github.com/AFNetworking/AFNetworking.git"
"/Users/abdsaniabdjalal/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7"
Cloning into bare repository '/Users/abdsaniabdjalal/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7'...
我最近刚升级到小牛,虽然我认为它与这个问题无关,以前有人遇到过这个问题吗?
编辑: 事实证明,我在将 pod 安装到我的项目时遇到了权限问题。
所以我已经尝试使用磁盘工具修复权限。我也尝试在启动时使用密码重置实用程序修复权限,但我仍然遇到这个问题。
使用 sudo 命令安装 pod 是可行的,但是我没有对 Pod 项目文件和 Workspace 文件的写入权限,因为它是由 root 创建的。
有人对如何解决这个问题有任何想法吗?
我在我的 Mac 上创建了另一个用户配置文件,它工作正常,但将其他所有内容转移到新配置文件对我来说很麻烦。
【问题讨论】:
-
您可能需要检查
which ruby以查看您正在使用的 ruby 安装。如果是系统,你可能需要使用sudo -
我使用了 sudo 并且它可以工作,但是现在工作区文件是由 root 创建的,我没有对该文件的读写访问权限。关于我做错了什么有什么想法吗?
标签: ios git permissions cocoapods