kernel_require.rb:55:in `require': cannot load such file

brew update時總是報錯,後查了stackoverflow才發現問題,是我本身把usr/local/下的share裏面文件刪了。git

解決方式很簡單:程序員

由於brew安裝完,默認放置地址都是usr/local下,且是用git去管理。github

git status   //看到不少被刪除記錄ruby

git checkout -- *.rb *.png  //從staged暫存區中,回覆被刪除文件。curl

回覆後,brew update 就ok了。工具

 

但因爲本人典型程序員龜毛本性,總感受清理不乾淨。因而:ui

卸載
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"url


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

 

brew 變成最新的了。哇嘎嘎,,,文檔

 

備註:

還會碰到這個bug:rbconfig.rb:213: warning: Insecure world writable

打開mac 下的 「磁盤工具」 ---》點擊「急救」,權限等會自動回覆。  若是是老版本,點擊「修復磁盤權限」便可。 

 

相關連接:

http://stackoverflow.com/questions/24652996/homebrew-not-working-on-osx //kernel_require 問題的解決文檔

https://ruby-china.org/topics/19321  //rbconfig.rb的問題解決文檔

相關文章
相關標籤/搜索