gpt4 book ai didi

ios - CocoaPods 权限问题

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:07:04 25 4
gpt4 key购买 nike

我使用 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'...

我最近刚升级到 Mavericks,虽然我认为这与这个问题无关,但以前有人遇到过这个问题吗?

编辑:事实证明,我在将 pod 安装到我的项目时遇到权限问题。

所以我已经尝试使用磁盘工具修复权限。我也尝试在启动时使用密码重置实用程序修复权限,但我仍然遇到这个问题。

使用 sudo 命令安装 pod 是可行的,但是我没有对 Pod 项目文件和工作区文件的写入权限,因为它是由 root 创建的。

有人知道如何解决这个问题吗?

我在我的 Mac 上创建了另一个用户配置文件,它工作正常,但将其他所有内容转移到新配置文件对我来说很麻烦。

最佳答案

这是羞辱。这个命令修复了它:

sudo chown -R username:groupname ~/Library/Caches/CocoaPods

取自这个答案:

cocoaPods pod install Permission denied

关于ios - CocoaPods 权限问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21087997/

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