Homebrew install permissions issue

后端 未结 7 1594
礼貌的吻别
礼貌的吻别 2020-12-13 02:01

I have a standard homebrew install inside of usr/local/

When I try:

Larson-2:~ larson$ brew install postgresql
Error: Cannot write to /usr/local/Cell         


        
7条回答
  •  眼角桃花
    2020-12-13 02:33

    Following the advice chukcha14 provided in his answer at There is no Cellar file in my usr/local dir for brew, I did this:

    jaimes-mbp:SMR jaimemontoya$ brew install mongodb-community@4.2
    Warning: You are using OS X 10.15.
    We do not provide support for this pre-release version.
    You may encounter build failures or other breakages.
    Error: Could not create /usr/local/Cellar
    Check you have permission to write to /usr/local
    jaimes-mbp:SMR jaimemontoya$ sudo mkdir /usr/local/Cellar
    Password:
    jaimes-mbp:SMR jaimemontoya$ sudo chown $(whoami) /usr/local/Cellar
    jaimes-mbp:SMR jaimemontoya$ brew install mongodb-community@4.2
    Warning: You are using OS X 10.15.
    We do not provide support for this pre-release version.
    You may encounter build failures or other breakages.
    ==> Installing mongodb-community from mongodb/homebrew-brew
    ==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.3.tgz
    ###################################################################################### 100.0%
    Error: Failed to install plist file
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink .
    /usr/local/opt is not writable.
    
    You can try again using:
      brew link mongodb-community
    Warning: The post-install step did not complete successfully
    You can try again using `brew postinstall mongodb/brew/mongodb-community`
    ==> Caveats
    To have launchd start mongodb/brew/mongodb-community at login:
      ln -sfv /usr/local/opt/mongodb-community/*.plist ~/Library/LaunchAgents
    Then to load mongodb/brew/mongodb-community now:
      launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
    Or, if you don't want/need launchctl, you can just run:
      mongod --config /usr/local/etc/mongod.conf
    ==> Summary
    

提交回复
热议问题