zoukankan      html  css  js  c++  java
  • Error Permission denied when running brew cleanup

    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 
    1. Page 1 of 1

    Page content loaded

    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 

    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 

    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/* 
    
  • 相关阅读:
    ubuntu18 任务栏调到底部
    十六, Oracle约束
    十五, 数据导出导入
    十四, 角色
    十三,权限
    十二, 系统默认参数
    十一,函数
    PL/SQL 九九乘法表
    十,事务和锁
    九, 表查询 三
  • 原文地址:https://www.cnblogs.com/mouseleo/p/11964932.html
Copyright © 2011-2022 走看看