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. 【Tools】VMware虚拟机三种网络模式详解和操作

    目录 00. 目录 01. VMware虚拟机三种网络模式 02. Bridged(桥接模式) 03. NAT(地址转换模式) 04. Host-Only(仅主机模式) 00. 目录 @ 参考:htt ...

  2. Go语言 ( 切片)

    本文主要介绍Go语言中切片(slice)及它的基本使用. 引子 因为数组的长度是固定的并且数组长度属于类型的一部分,所以数组有很多的局限性. 例如: func arraySum(x []int) in ...

  3. Consul 的安装与基本使用

    什么是 Consul ​ Consul是一种服务网格解决方案,提供具有服务发现,配置和分段功能的全功能控制平面.这些功能中的每一个都可以根据需要单独使用,也可以一起使用以构建全服务网格.Consul需 ...

  4. IdentityServer4之Jwt身份验证方案分析

    一,准备内容 在之前讲过的asp.net core 实现OAuth2.0四种模式系列中的IdentityApi客户端用到了以下配置代码 public void ConfigureServices(IS ...

  5. VBA编程图表(二十一)

    使用VBA,可以根据特定标准生成图表.下面通过一个例子来看看它如何实现. 第1步 - 输入要生成图形的数据. 第2步 - 创建3个按钮 - 一个生成条形图,另一个生成饼图,另一个生成柱形图. 第3步 ...

  6. web项目服务器安装及配置(虚拟机centOS7)

    一.安装VMware(如需) 1.首先下载VMware虚拟机,地址: https://www.vmware.com/products/workstation-pro/workstation-pro-e ...

  7. Qt ListWidget item 发起拖放

    第一步:重写类 MyListWidget 继承自 QListWidget 第二步:重写 mousePressEvent 函数 和 mouseMoveEvent 函数 void mousePressEv ...

  8. SAP 2019 TechEd Key Note解读:云时代下SAP从业人员如何做二次开发?

    刚刚过去的在巴塞罗那举行的2019 SAP TechEd,SAP照例向全球广大的SAP生态圈从业者们传达了一些重要的信息,其中一条为:Building Extensions for the Intel ...

  9. MyBatis之Oracle、Mysql批量插入

    Mybatis中Dao层 public interface UsersMapper { public void insertEntitys(List<UserEntity> users); ...

  10. MySQL DataType--隐式类型转换

    隐式类型转换 在官方文档中对隐式类型转换规则有如下描述: 1. If one or both arguments are NULL, the result of the comparison is N ...