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. Windows Live Writer介绍及相关问题解决

    今天本来想说更新一篇我的文章,更新的过程中添加了很多的内容,里面的图片太多了,导致我浏览器占用的内存不断增大,浏览器变得很卡,最后过了好久我终于更新完文章打算保存的时候居然卡住,然后所有我更新的文字和 ...

  2. 【Unity3D与23种设计模式】游戏的主循环——Game Loop

    游戏与其他软件最大的不同 就是游戏有Update逻辑 一般的软件是由"事件"驱动 因为它不会突然跑出来一只"兔子" 因此,只有游戏才有"帧" ...

  3. prompt 方法显示输入对话框

    prompt 方法显示输入对话框 原理: prompt() 方法用于与用户交互,提示用户输入信息的对话框. prompt(str1,str2);此方法包含两个属性: str1:用于提示用户输入的信息. ...

  4. leaflet渲染mapbox gl的矢量数据

    准备条件 1.mapbox-gl.js mapbox-gl.css 2.leaflet-mapbox-gl.js https://github.com/mapbox/mapbox-gl-leaflet ...

  5. Nginx配置ThinkPHP下的url重写(隐藏入口)

    搭建好项目后,在网址上输入域名,只能访问首页,其他页面全是404. 在域名后面和控制器前面加上index.php就可以访问. 在tp5官网手册查找后进行配置修改. 打开nginx.conf 后 ,在s ...

  6. Vue常用开源项目汇总

    前言:Vue (读音 /vjuː/,类似于 view) 是一套用于构建用户界面的渐进式框架.与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用.Vue 的核心库只关注视图层,不仅易于上手,还 ...

  7. 关于JSP页面URL传值所遇到的小问题

    在JSP页面中我的页面传值加了分号,在后台取值是没有问题的. 但是在XML底层执行时就会返回不了值,这是什么原因呢? 经过努力排查发现了分号导致了${XXX}的值都成了和前面ID一样的串.去掉${XX ...

  8. 设计模式 --> (8)组合模式

    组合模式 组合模式,是为了解决整体和部分的一致对待的问题而产生的,要求这个整体与部分有一致的操作或行为.部分和整体都继承与一个公共的抽象类,这样,外部使用它们时是一致的,不用管是整体还是部分,使用一个 ...

  9. ElasticSearch的安装

    一.安装javaSE环境(已配java环境变量的请直接跳过) 1.从Java JDK 官网下载适合自己的jdk版本.(我自己用的jdk1.7) 2.安装jdk后,配置java环境变量(ps:比较喜欢简 ...

  10. js和jquery实现显示隐藏

    (选择的重要性) 当点击同一个按钮的时候实现显示影藏 <a id="link" class="b-btn-four task-resolve add-sub-tas ...