无法在MacOS El Capitan上更新自制软件

无法在MacOS El Capitan上更新自制软件,macos,homebrew,osx-elcapitan,Macos,Homebrew,Osx Elcapitan,要将我的KeePassX与我的浏览功能集成,我尝试遵循以下指南: 但我不断遇到新的问题。我安装了自制软件(可能是在我的系统进行新设置之前),但有一段时间没有使用它。所以当我试着做: brew安装qt cmake libgcrypt zlib libmicrohttpd 我收到了以下错误: 错误:Zlib:Class的未定义方法“desc” 我发现这可能是一个更新问题,所以我尝试了 brew更新 这给了我: 致命:无法创建“/usr/local/.git/index.lock”:权限被拒绝 如何

要将我的KeePassX与我的浏览功能集成,我尝试遵循以下指南:

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

我收到了以下错误:

错误:Zlib:Class的未定义方法“desc”

我发现这可能是一个更新问题,所以我尝试了 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`.

我看到一些冗余,但我不知道如何处理它们。

确保
/usr/local
下的所有内容都属于组
管理员

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

确保
/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

谢谢你的帮助!当我尝试chgrp-R admin/usr/local时,我基本上得到了不允许的操作。。在此处找到完整输出:有任何提示吗?请尝试运行
sudochown-R$(whoami):admin/usr/local
而不是
chgrp
。如果仍然说许可被拒绝,我会尝试重新安装homebrew。在完成了您建议的所有操作后,我得到了以下结果:AnkeNowsMacBook:~anke$brew更新致命:无法访问“”:无法解决主机:github.com错误:执行时失败:git pull-q origin refs/heads/master:refs/remotes/origin/master我可以在不卸载以前的版本的情况下重新安装homebrew吗版本?由于网络错误,它似乎无法更新。您正在使用VPN连接吗?要重新安装自制软件,您需要先卸载它,然后再安装。谢谢您的帮助!当我尝试chgrp-R admin/usr/local时,我基本上得到了不允许的操作。。在此处找到完整输出:有任何提示吗?请尝试运行
sudochown-R$(whoami):admin/usr/local
而不是
chgrp
。如果仍然说许可被拒绝,我会尝试重新安装homebrew。在完成了您建议的所有操作后,我得到了以下结果:AnkeNowsMacBook:~anke$brew更新致命:无法访问“”:无法解决主机:github.com错误:执行时失败:git pull-q origin refs/heads/master:refs/remotes/origin/master我可以在不卸载以前的版本的情况下重新安装homebrew吗版本?由于网络错误,它似乎无法更新。您正在使用VPN连接吗?要重新安装自制软件,您需要先卸载它,然后再安装。