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. 常用Tables控件介绍(一)

    1.DataTables Datatables是一款jquery表格插件.它是一个高度灵活的工具,可以将任何HTML表格添加高级的交互功能. 分页,即时搜索和排序 几乎支持任何数据源:DOM, jav ...

  2. macbook下使用pycharm2019版本配置远程连接服务器

    pycharm提供了很方便的与服务器同步代码,并执行的插件.我在配置windows版的pycharm时配置成功,在挪用到mac上则遇到了些许问题,终于是解决了,在此记录配置的过程 目的:pycharm ...

  3. SpringBoot +MSSQL

    ____SpringBoot +MSSQL_______________________________________________________________________________ ...

  4. ViewState到底是什么

    ViewState是“客户端”状态保持的一种方案,ViewState是.net中特有的,其他的编程语言,如:Java.PHP中是没有ViewState这个概念的. 举个简单的例子ViewState的例 ...

  5. 3.建造模式(Builder)

    注:图片来源于 https://www.cnblogs.com/-saligia-/p/10216752.html 建造模式UML图解析: 代码: Director.h // // Created b ...

  6. 视觉AI风口一触即发,虹软AI沙龙点金深圳

    7月26日,虹软AI沙龙在深圳湾科技生态园空间举办.AI沙龙是基于虹软视觉开放平台的开发者交流沙龙,旨在通过分享最新的实战案例,帮助开发者解决技术及落地难题,让技术更贴近实用场景. 本次活动中,深圳市 ...

  7. python多进程间通信

    这里使用pipe代码如下: import time from multiprocessing import Process import multiprocessing class D: @stati ...

  8. django admin日期变为可以修改

    Django - 日期.时间字段   阅读目录 DateTimeField.auto_now DateTimeField.auto_now_add admin中的日期时间字段 如何将创建时间设置为“默 ...

  9. CLR、CIL、CTS、CLS、CLI、BCL和FCL,JIT,IL,GC

    如果要想深入学习.NET平台,那么标题中的这些关键字对你来说并不陌生,这些名词构成了.NET庞大的生态系统,为了宏观认识.NET平台,学些.NET架构体系,针对一些常用常用名词的理解是很有必要的,未必 ...

  10. 学习python的日常

    今天是开始正式接触python语言的第一天,然后来自前辈的知道开始了在学习过程当中用博客来记录自己的学习历程,以供自己更快地掌握这门编程语言. 大概的总结一下的话,还是按照我的编程的习惯,要学写代码, ...