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. python基础 — Mysql Server

    sql server对于字符类型的有:char:固定长度,存储ANSI字符,不足的补英文半角空格.nchar:固定长度,存储Unicode字符,不足的补英文半角空格varchar:可变长度,存储ANS ...

  2. docekr安装mysql,redis,git和maven 脚本

    编写脚本 images_install.sh #!/bin/bash # author:qiao # 安装脚本 # reids:3.2(自启) mysql:5.7(自启)或者JDK:1.8 tomca ...

  3. 转:深入浅出Java垃圾回收机制

    原文链接:http://www.importnew.com/1993.html 对于Java开发人员来说,了解垃圾回收机制(GC)有哪些好处呢?首先可以满足作为一名软件工程师的求知欲,其次,深入了解G ...

  4. oracle数据库 TIMESTAMP(6)时间戳类型

    时间戳类型,参数6指的是表示秒的数字的小数点右边可以存储6位数字,最多9位.由于时间戳的精确度很高,我们也常常用来作为版本控制. 插入时,如下方式:insert into test4 values(t ...

  5. ADO.NET 七(一个例子)

    通过一个完整的实例实现课程信息管理功能的操作,包括查询.修改.删除课程信息等操作. 1) 创建课程信息表 create table StuCourse ( id int primary key ide ...

  6. 6:Partial Update 内部原理 和 乐观锁并发控制

    Partial Update 内部执行过程: 首先,ES文档是不可变的,它们只能被修改,不能被替换.Update Api 也不例外. Update API 简单使用与之前描述相同的 检索-修改-重建索 ...

  7. Java中关于Math的几个取整方法的区别

    1.Math.ceil()   向上取整 System.out.println(Math.ceil(3.4)); //输出4 System.out.println(Math.ceil(3.7)); / ...

  8. 微信小程序组件通信入门及组件生命周期函数

    组件生命周期函数链接地址:https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/lifetimes.h ...

  9. a标签中target属性为“_blank”时存在安全问题

    今天看到一个比较有意思的洞,虽然不够严重,但是却普遍存在各大src中 熟悉js的朋友都应该知道当我们在调用window下的open方法创建一个新窗口的同时,我们可以获得一个创建窗口的opener句柄, ...

  10. 如何使用API的方式消费SAP Commerce Cloud的订单服务

    最近Jerry在做一个微信和SAP Commerce Cloud集成的项目,需要在微信里调用后者的Restful API进行订单创建和读取.以前Jerry对SAP Commerce Cloud知之甚少 ...