无法在MacOS El Capitan上更新Homebrew

时间:2016-06-06 14:10:27

标签: macos homebrew osx-elcapitan

要将我的KeePassX与浏览器集成,我尝试按照本指南操作: http://dareneiri.github.io/Setting-Up-KeePassX-With-Autologin/

但我不断遇到新问题。我安装了自制软件(可能在我的系统的新设置之前)但是没有使用它一段时间。所以当我尝试做的时候: brew install qt cmake libgcrypt zlib libmicrohttpd

我收到以下错误:

  

错误:未定义的方法`desc'对于Zlib:Class

我发现这可能是一个更新问题,所以我试过了 brew更新

给了我:

  

致命:无法创建' /usr/local/.git/index.lock':权限被拒绝

如何解决权限问题?我出于同样的原因无法卸载和安装。

brew医生给我:

AnkeNowsMacBook:keepassx-master anke$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Your XQuartz (2.7.3) is outdated
Please install XQuartz 2.7.7:
  https://xquartz.macosforge.org

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/librtmp.dylib

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    autoconf
    autoconf (vom alten Mac)
    automake
    automake (vom alten Mac)
    git (vom alten Mac)
    libgpg-error (vom alten Mac)
    libksba (vom alten Mac)
    libtool
    libtool (vom alten Mac)
    libyaml (vom alten Mac)
    makedepend (vom alten Mac)
    openssl (vom alten Mac)
    pkg-config (vom alten Mac)
    readline (vom alten Mac)
Error: Failed to import: apple-gcc42
undefined method `desc' for AppleGcc42:Class
Error: Failed to import: awk
undefined method `desc' for Awk:Class
Error: Failed to import: bc
undefined method `desc' for Bc:Class
Error: Failed to import: bzip2
undefined method `desc' for Bzip2:Class
Error: Failed to import: diffstat
undefined method `desc' for Diffstat:Class
Error: Failed to import: diffutils
undefined method `desc' for Diffutils:Class
Error: Failed to import: ed
undefined method `desc' for Ed:Class
Error: Failed to import: expect
undefined method `desc' for Expect:Class
Error: Failed to import: file-formula
undefined method `desc' for FileFormula:Class
Error: Failed to import: gpatch
undefined method `desc' for Gpatch:Class
Error: Failed to import: gperf
undefined method `desc' for Gperf:Class
Error: Failed to import: grep
undefined method `desc' for Grep:Class
Error: Failed to import: groff
undefined method `desc' for Groff:Class
Error: Failed to import: gzip
undefined method `desc' for Gzip:Class
Error: Failed to import: heimdal
undefined method `desc' for Heimdal:Class
Error: Failed to import: krb5
undefined method `desc' for Krb5:Class
Error: Failed to import: lapack
undefined method `desc' for Lapack:Class
Error: Failed to import: less
undefined method `desc' for Less:Class
Error: Failed to import: libedit
undefined method `desc' for Libedit:Class
Error: Failed to import: libiconv
undefined method `desc' for Libiconv:Class
Error: Failed to import: libpcap
undefined method `desc' for Libpcap:Class
Error: Failed to import: lsof
undefined method `desc' for Lsof:Class
Error: Failed to import: m4
undefined method `desc' for M4:Class
Error: Failed to import: make
undefined method `desc' for Make:Class
Error: Failed to import: nano
undefined method `desc' for Nano:Class
Error: Failed to import: ncurses
undefined method `desc' for Ncurses:Class
Error: Failed to import: openldap
undefined method `desc' for Openldap:Class
Error: Failed to import: openssh
undefined method `desc' for Openssh:Class
Error: Failed to import: rsync
undefined method `desc' for Rsync:Class
Error: Failed to import: screen
undefined method `desc' for Screen:Class
Error: Failed to import: srm
undefined method `desc' for Srm:Class
Error: Failed to import: tcl-tk
undefined method `desc' for TclTk:Class
Error: Failed to import: tcpdump
undefined method `desc' for Tcpdump:Class
Error: Failed to import: units
undefined method `desc' for Units:Class
Error: Failed to import: unzip
undefined method `desc' for Unzip:Class
Error: Failed to import: whois
undefined method `desc' for Whois:Class
Error: Failed to import: zlib
undefined method `desc' for Zlib:Class

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.

我看到一些裁员,但我不知道如何处理他们。

1 个答案:

答案 0 :(得分:0)

确保/usr/local下的所有内容都属于群组admin

chgrp -R admin /usr/local
chmod -R g+w /usr/local

允许小组admin中的任何人在/usr/local

中撰写任何内容
chgrp -R admin /Library/Caches/Homebrew
chmod -R g+w /Library/Caches/Homebrew

未定义的方法desc表示您的自制软件已过时。更改权限后,请尝试再次运行brew update