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. Java Swing应用程序 JComboBox下拉框联动查询

    在web项目中,通过下拉框.JQuery和ajax可以实现下拉框联动查询. 譬如说,当你查询某个地方时,页面上有:省份:<下拉框省份> 市区:<下拉框市区> 县乡:<下拉 ...

  2. IE浏览器URL中文传参,后端接收是乱码问题处理

    这个问题还是因为IE浏览器是国外产品,人家交流的主要语言是英语,中文不识别. 直接上代码,亲测无误. //判断是否是IE浏览器 function isIE() { var userAgent = na ...

  3. 边做边学入门微信小程序之仿豆瓣评分

    微信小程序由于适用性强.逻辑简要.开发迅速的特性,叠加具有海量活跃用户的腾讯公司背景,逐渐成为了轻量级单一功能应用场景的较佳承载方式,诸如电影购票.外卖点餐.移动商城.生活服务等场景服务提供商迅速切入 ...

  4. 剑指Offer-求1+2+3+...+n

    package Other; /** * 求1+2+3+...+n * 求1+2+3+...+n,要求不能使用乘除法.for.while.if.else.switch.case等关键字及条件判断语句( ...

  5. 从源码浅析Java中的Lock和AbstractQueuedSynchronizer

    在之前的文章中我也曾经介绍过Lock,像ReentrantLock(可重入锁)和ReentrantReadWriteLock(可重入读写锁),这些所我们在说的时候并没有详细的说明它们的原理,仅仅说明了 ...

  6. 【网络】 应用&传输层笔记

    应用层 应用层常用的协议和各自对应的TCP/UDP端口: DNS TCP/UDP 53 HTTP TCP 80 SMTP TCP 25 POP UDP 110 Telnet TCP 23 DHCP U ...

  7. 【Linux】 用户管理

    Linux用户管理 ■ 查看用户整体情况 cat /etc/passwd可以查看用户的一些基本信息.用finger <user>似乎更加方便 查看某一个特定的用户的话就可以 grep &l ...

  8. 关于BufferedReader的readLine方法遇到的坑

    今天偶然用到BufferedReader,在读取文本后输出数据的时候遇到了隔行输出的问题. 如: 床前明月光 疑是地上霜 123456 789789 输出的为:疑是地上霜789789 找了一下,最终找 ...

  9. [luogu1402]酒店之王_网络流

    酒店之王 luogu-1402 题目大意:有n个人,p道菜,q个房间,每个人喜欢吃一些菜.喜欢住一些房间,如果一个人即住到了他喜欢的房间有吃到了他喜欢的菜,就对答案贡献++,求最大贡献. 注释:1&l ...

  10. Git详细教程(1)---个人Git的基本使用

    分布式版本控制系统--git 一.什么是Git 1.Git是什么 Git是目前世界上最先进的分布式版本控制系统(没有之一). 实际上版本控制系统有如下几个: 1) CVS 2)  SVN 3) Git ...