brew update 错误是这样的

chown: /usr/local: Operation not permitted

然后网上osx 10.11, 10.12的解决方法这样的

The problem mainly occurs after updating OS X to El Capitan (OS X 10.11) or macOS Sierra (macOS 10.12). This is mainly because of file permission issues with El Capitan’s or later macOS's new SIP process. Try changing permissions of /usr/local directory.
$ sudo chown -R $(whoami):admin /usr/local 
If it still doesn't work, use following steps and everything will be fine. This may be because homebrew is not updated.
. open terminal
. $ cd /usr/local/Library/Homebrew
. $ git reset --hard
. $ git clean -df
. $ brew update

10.13之后库克怒了,不管你怎么执行命令都不让你运行 哪怕是root ,所以有人这么干:

看来只有关掉SIP了

.重启Mac,按住Command + R键直到Apple Logo出现,进入Recovery Mode模式(我感觉我是按了好半天)

.点击工具里的Terminal(终端)

.输入csrutil disable,之后回车

.重启Mac

.重启完成后,终端中输入 sudo chflags norestricted /usr/local && sudo chown -R $(whoami):admin /usr/local

成功执行,没有报操作不允许了

(如果想重新开启安全设置,则重复1、2步骤,输入csrutil enable就可以了)

然而根本没这么麻烦 这样就可以搞定 OS X 10.13 brew not work (简单的说就是卸载了再安装)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)”
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Homebrew update error not work on OSX的更多相关文章

  1. Mac OSX系统homebrew update Fetching failed问题解决方案

    1. brew update error (i) 问题出现及现象描述 昨天换了台电脑,有些软件需要重新安装或更新一下,遇到了下面的问题 cv@xys-MacBook-Pro ~ % brew upda ...

  2. 如何解決 Homebrew Update 失敗?

    相信許多用 MAC 系統的程式設計師.工程師們都有用 Homebrew 這個超好用的 Open Source 套件管理程式吧? 如果沒有的話,你可以透過以下的指令安裝: ruby -e "$ ...

  3. 解决brew报错:Another active Homebrew update process is already in progress

    在mac终端下执行:brew install glew结果报错: Error: Another active Homebrew update process is already in progres ...

  4. eclipse maven update error 解决方法

    eclipse  maven  update error 解决方法     本来真不想写这篇博文的,但是eclipse和maven真的是太操蛋了,动不动就出了一些乱七八糟的问题,记录一下.希望公司能早 ...

  5. Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table

    Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table ...

  6. vue报错之Duplicate keys detected: '0'. This may cause an update error.

    昨天运行vue项目的时候,出现了[Vue warn]: Duplicate keys detected: '0'. This may cause an update error(错误,检测到重复的ke ...

  7. [Vue warn]: Duplicate keys detected: '0'. This may cause an update error.

    1.[Vue warn]: Duplicate keys detected: '0'. This may cause an update error. 第一眼看到这个错误一脸懵逼,项目使用很久了,代码 ...

  8. Duplicate keys detected: '0'. This may cause an update error.

    在运行vue项目的时候报了:[Vue warn]: Duplicate keys detected: ‘0’. This may cause an update error(错误,检测到重复的key值 ...

  9. pve apt-get update error 升级报错-文章未完工和验证

    pve: apt-get update error 升级报错 提示如下报错 Hit: http://security.debian.org buster/updates InRelease Hit: ...

随机推荐

  1. The method queryForMap(String, Object...) from the type JdbcTemplate refers to the missing type DataAccessException

    Add spring-tx jar of your spring version to your classpath.

  2. 简述TCP的三次握手过程

    一.TCP报文格式   TCP/IP协议的详细信息参看<TCP/IP协议详解>三卷本.下面是TCP报文格式图: 图1 TCP报文格式         上图中有几个字段需要重点介绍下:    ...

  3. shell总的exit与sleep

  4. Keepalived+Nginx实现高可用负载均衡集群

    一 环境介绍 1.操作系统CentOS Linux release 7.2.1511 (Core) 2.服务keepalived+nginx双主高可用负载均衡集群及LAMP应用keepalived-1 ...

  5. rocketMq概念介绍

    rocketMq官网 http://rocketmq.apache.org/ rocketMq逻辑概念介绍 rocketMq逻辑图 备注:    改图片分享自李占卫的网上家园 说明: 在rocketM ...

  6. Mycat 配置说明(rule.xml)

    rule.xml 配置文件定义了我们对表进行拆分所涉及到的规则定义.我们可以灵活的对表使用不同的分片算法, 或者对表使用相同的算法但具体的参数不同. tableRule 标签 该标签用于定义表的拆分规 ...

  7. hadoop2.6.5运行wordcount实例

    运行wordcount实例 在/tmp目录下生成两个文本文件,上面随便写两个单词. cd /tmp/ mkdir file cd file/ echo "Hello world" ...

  8. VUE请求本地数据的配置json-server

    VUE开发请求本地数据的配置,早期的vue-lic下面有dev-server.js和dev-client.js两文件,请求本地数据在dev-server.js里配置,最新的vue-webpack-te ...

  9. Leetcode 3——Palindrome Number(回文数)

    Problem: Determine whether an integer is a palindrome. Do this without extra space. 简单的回文数,大一肯定有要求写过 ...

  10. Beta No.3

    今天遇到的困难: 组员对github极度的不适应 github的版本控制和协同化编程确实操作起来需要一定的熟练度,我们缺乏这种熟练度 Android Studio版本不一致项目难以打开的问题仍然无法解 ...