Brew error: Could not symlink, path is not writable

后端 未结 5 506
醉梦人生
醉梦人生 2021-01-30 02:19

When I try to install a library with homebrew (brew install aLibrary), I got the following error:

Could not symlink lib/pkgconfig/a         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 02:38

    Giant Elk had a great suggestion and this is how I fixed my issue, which in my opinion is the cleanest. Users should not change permissions unless they know the ramifications.

    1. Output your installed packages (via brew) to a text file:

      brew list > brewlist.txt
      
    2. Uninstall brew:

      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
      
    3. Re-install brew:

      /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      
    4. Re-install previous packages (edit list if you do not need all packages):

      brew install $(< brewlist.txt )
      

提交回复
热议问题