Error Permission denied when running brew cleanup

When I try to run `brew cleanup` I get:

Warning: Skipping atk: most recent version 2.34.1 not installed

Warning: Skipping git: most recent version 2.23.0_1 not installed

Warning: Skipping libgcrypt: most recent version 1.8.5 not installed

Warning: Skipping nspr: most recent version 4.23 not installed

Warning: Skipping nss: most recent version 3.46.1 not installed

Warning: Skipping poppler: most recent version 0.81.0 not installed

Error: Permission denied @ apply2files - /Users/iuliaulialiaia/Library/Caches/Homebrew/.cleaned

I can neither run other commands that uses `brew cleanup`, like `brew upgrade`:

...

==> `brew cleanup` has not been run in 30 days, running now...

Removing: /usr/local/Cellar/python@2/2.7.16... (3,750 files, 51.6MB)

Error: Permission denied @ apply2files - /Users/iuliaulialiaia/Library/Caches/Homebrew/.cleaned

P.S.: I cannot run homebrew as root:

Error: Running Homebrew as root is extremely dangerous and no longer supported.

As Homebrew does not drop privileges on installation you would be giving all

build scripts full access to your system.

MacBook Pro 13", macOS 10.14

Posted on Oct 30, 2019 12:27 AM

Reply I have this question too (8)

All replies

Drop Down menu

  1. Page 1 of 1

Page content loaded

User profile for user: VikingOSX

VikingOSX

 

User level:Level 9

(50,167 points)

 
macOSSpeciality level out of ten: 1

Oct 30, 2019 5:39 AM in response to iuliaulialiaia

At some point, I believe homebrew was suggesting one change the ownership and group of /usr/local to $(whoami):admin — which is what I have set (in Mojave) and homebrew just works for update, upgrade, and cleanup. A bit more of a PITA on Catalina though.

Reply Helpful

Thread reply - more options
User profile for user: Jmcgui

Jmcgui

 

User level:Level 1

(4 points)

Oct 30, 2019 8:45 AM in response to iuliaulialiaia

Guessing you are running Catalina then! It's changed the permissions model which has broken lots of stuff :(

This should work:

sudo chown -R $(whoami):admin /usr/local/* && sudo chomd -R g+rwx /usr/local/*

Then try brew cleanup

Reply Helpful

Thread reply - more options
User profile for user: mmongeau

mmongeau

 

User level:Level 1

(4 points)

Nov 1, 2019 8:39 PM in response to Jmcgui

The second command has a typo, it should be chmod instead of chomd

sudo chown -R $(whoami):admin /usr/local/* && sudo chmod -R g+rwx /usr/local/*

Error Permission denied when running brew cleanup的更多相关文章

  1. gerrit error: unpack failed: error Permission denied

    gerrit服务器迁移后,clone和pull代码到本地,都没问题. 但是,push时,报错: 查看了下git版本库存储目录,发现git下版本库镜像文件owner都是root.因为之前安装的gerri ...

  2. GITHUB 提交错误 Error: Permission denied (publickey) 解决

    1.  在开发机上生成自己的密钥 ssh-keygen -b 1024 -t rsa -b 指密钥对长度  -t 指加密方式 Enter file in which to save the key ( ...

  3. Postgresql ERROR: permission denied for relation app_info

    启用终端,: 进入mydb数据库:\c mydb 然后给当前数据库的角色赋予权限:GRANT ALL PRIVILEGES ON TABLE 表名  TO 角色名;

  4. postgrSQL 错误ERROR: permission denied

    赋权限: GRANT ALL PRIVILEGES ON TABLE 表名 TO 用户;

  5. Mac安装Python3报错Permission denied @ dir_s_mkdir - /usr/local/Frameworks

    brew安装Python3时出现的问题: Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks /usr/local/Frame ...

  6. sendto : Permission denied

    遇到如题的问题,google了一番,找到了解决方法,写下来备用 问题: udp发送数据时候报错sendto error  : Permission denied 改正方法: 在创建了套接字后,加上下列 ...

  7. [pod install] error: cannot open .git/FETCH_HEAD: Permission denied

    pod installAnalyzing dependencies[!] Pod::Executable pull error: cannot open .git/FETCH_HEAD: Permis ...

  8. Mac idea error=13, Permission denied

    问题 12:26 Error running 'rs8080': Cannot run program "/Users/xxx/software/apache-tomcat-8.5.37/b ...

  9. kafka启动时出现FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) java.io.IOException: Permission denied错误解决办法(图文详解)

    首先,说明,我kafk的server.properties是 kafka的server.properties配置文件参考示范(图文详解)(多种方式) 问题详情 然后,我启动时,出现如下 [hadoop ...

随机推荐

  1. Java 总结篇2

    第02章:数据类型和运算符 一.概述: 1.数据类型:int.float.char.boolean 2.运算符:算术运算符.赋值运算符.关系运算符.逻辑运算符.位运算符(了解即可).条件运算符 3.基 ...

  2. NOI2017

    整数(线段树) 不难想到按位处理,位数比较多考虑使用动态开点线段树维护大数,那么复杂度是\(O(nlog^2n)\)的,不够优秀. 但注意到我们需要支持的是二进制下的加减法,而在二进制下我们可以使用i ...

  3. python多线程爬取世纪佳缘女生资料并简单数据分析

    一. 目标 ​ 作为一只万年单身狗,一直很好奇女生找对象的时候都在想啥呢,这事也不好意思直接问身边的女生,不然别人还以为你要跟她表白啥的,况且工科出身的自己本来接触的女生就少,即使是挨个问遍,样本量也 ...

  4. ASP.NET Core 过滤器中使用依赖注入

    如何给过滤器ActionFilterAttribute也用上构造函数注入呢? 一般自定义的过滤器直接用特性方式标识就能使用 [ContentFilter] 因为构造函数在使用的时候要求传参,然后我们可 ...

  5. PKPM BIMViewer的使用

    模型的使用,目前有两个方案, 一个是使用全局组件,在单页面的主页面中进行嵌套 <template> <div id="model"> <!-- 这样的 ...

  6. Dubbo -- 四种loadBalance负载均衡算法

    Dubbo中的一个关键接口LoadBalance,dubbo是按照其中的规则来调用多台provider的服务的. 先看一下接口的实现类图: 从上图中我们可以看到dubbo提供了四种算法来实现负载均衡. ...

  7. sshpass非交互式连接

    $ sshpass -p $passwd ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $USER@$IP 'echo ...

  8. UnicodeDecodeError: 'utf-8' codec can't decode byte..问题

    解决UnicodeDecodeError: 'utf-8' codec can't decode byte..问题 问题描述: 问题分析: 该情况是由于出现了无法进行转换的 二进制数据 造成的,可以写 ...

  9. Solr-rce历史漏洞复现

    最近Solr又出了一个RCE漏洞,复现了一下 # coding: utf-8 import requestsimport argparsefrom urllib import parse if __n ...

  10. Android ProGuard:代码混淆压缩

    写这篇文章的目的 一直以来,在项目中需要进行代码混淆时每次都要去翻文档,很麻烦.也没有像写代码那样记得那么多.既然要查来查去,就不如自己捋一捋这个知识点了,被人写的终究还是别人的.所以自己去翻看了很多 ...