No such keg: /usr/local/Cellar/git

后端 未结 3 1426
清歌不尽
清歌不尽 2020-12-04 17:48

I have been struggling with this for a few hours. I am on a Mac using Yosemite. I had homebrew installed, and was using git just fine. I tried doing $git add -i

3条回答
  •  执笔经年
    2020-12-04 18:27

    Had a similar issue while installing "Lua" in OS X using homebrew. I guess it could be useful for other users facing similar issue in homebrew.

    On running the command:

    $ brew install lua

    The command returned an error:

    Error: /usr/local/opt/lua is not a valid keg
    (in general the error can be of /usr/local/opt/ is not a valid keg

    FIXED it by deleting the file/directory it is referring to, i.e., deleting the "/usr/local/opt/lua" file.

    root-user # rm -rf /usr/local/opt/lua

    And then running the brew install command returned success.

提交回复
热议问题