自制:酿造医生抛出很多错误,我该如何解决? [英] Homebrew: brew doctor throwing up a lot of errors, how can I fix them?

查看:69
本文介绍了自制:酿造医生抛出很多错误,我该如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很早以前就安装了homebrew,但并没有使用太多,但是我正在考虑重新开始使用它,因为它是一个非常有用且易于使用的软件包安装程序.无论如何,我跑了酿酒医生,并收到了很多警告,但我不确定该如何解决!我特别害怕删除.dylib,.la和.pc文件,以防未通过自制软件安装的软件包需要它们.如果在我运行的是Mac OS X Mountain Lion(10.8.3)的情况下很重要,那么对此问题的任何帮助将不胜感激,我的警告列表如下:

UOS-12044:~ as34g12$ brew doctor
Warning: /usr/local/include isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.

If a brew tries to write a header file to this directory, the install will
fail during the link step.

You should probably `chown` /usr/local/include
Warning: /usr/local/share isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.

If a brew tries to write a file to this directory, the install will
fail during the link step.

You should probably `chown` /usr/local/share
Warning: Some directories in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/locale
    /usr/local/share/locale/be
    /usr/local/share/locale/be/LC_MESSAGES
    /usr/local/share/locale/ca
    /usr/local/share/locale/ca/LC_MESSAGES
    /usr/local/share/locale/da
    /usr/local/share/locale/da/LC_MESSAGES
    /usr/local/share/locale/de
    /usr/local/share/locale/de/LC_MESSAGES
    /usr/local/share/locale/el
    /usr/local/share/locale/el/LC_MESSAGES
    /usr/local/share/locale/es
    /usr/local/share/locale/es/LC_MESSAGES
    /usr/local/share/locale/fr
    /usr/local/share/locale/fr/LC_MESSAGES
    /usr/local/share/locale/ja
    /usr/local/share/locale/ja/LC_MESSAGES
    /usr/local/share/locale/nl
    /usr/local/share/locale/nl/LC_MESSAGES
    /usr/local/share/locale/sv
    /usr/local/share/locale/sv/LC_MESSAGES
    /usr/local/share/locale/tr
    /usr/local/share/locale/tr/LC_MESSAGES
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
Warning: Setting DYLD_LIBRARY_PATH can break dynamic linking.
You should probably unset it.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
    /Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
    /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
    /soft/star-hikianalia/bin/gsl-config
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/libatomic.1.dylib
    /usr/local/lib/libg2c.0.0.0.dylib
    /usr/local/lib/libgcc_ext.10.4.dylib
    /usr/local/lib/libgcc_ext.10.5.dylib
    /usr/local/lib/libgcc_s.1.dylib
    /usr/local/lib/libgfortran.3.dylib
    /usr/local/lib/libgomp.1.dylib
    /usr/local/lib/libitm.1.dylib
    /usr/local/lib/libmacfuse_i32.2.dylib
    /usr/local/lib/libmacfuse_i64.2.dylib
    /usr/local/lib/libntfs-3g.80.dylib
    /usr/local/lib/libntfs.9.0.0.dylib
    /usr/local/lib/libosxfuse_i32.2.dylib
    /usr/local/lib/libosxfuse_i64.2.dylib
    /usr/local/lib/libquadmath.0.dylib
    /usr/local/lib/libssp.0.dylib
    /usr/local/lib/libstdc++.6.dylib
    /usr/local/lib/libublio.1.dylib
Warning: Unbrewed .la files 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 .la files:
    /usr/local/lib/libatomic.la
    /usr/local/lib/libfftw3.la
    /usr/local/lib/libfftw3_threads.la
    /usr/local/lib/libfftw3f.la
    /usr/local/lib/libfftw3f_threads.la
    /usr/local/lib/libg2c.la
    /usr/local/lib/libgfortran.la
    /usr/local/lib/libgmp.la
    /usr/local/lib/libgomp.la
    /usr/local/lib/libitm.la
    /usr/local/lib/libmpc.la
    /usr/local/lib/libmpfr.la
    /usr/local/lib/libntfs-3g.la
    /usr/local/lib/libntfs.la
    /usr/local/lib/libosxfuse_i32.la
    /usr/local/lib/libosxfuse_i64.la
    /usr/local/lib/libquadmath.la
    /usr/local/lib/libssp.la
    /usr/local/lib/libssp_nonshared.la
    /usr/local/lib/libstdc++.la
    /usr/local/lib/libsupc++.la
    /usr/local/lib/libublio.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/cfitsio.pc
    /usr/local/lib/pkgconfig/fftw3.pc
    /usr/local/lib/pkgconfig/fftw3f.pc
    /usr/local/lib/pkgconfig/libntfs-3g.pc
    /usr/local/lib/pkgconfig/libublio.pc
    /usr/local/lib/pkgconfig/osxfuse.pc
Warning: Unbrewed static libraries 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 static libraries:
    /usr/local/lib/libatlas.a
    /usr/local/lib/libatomic.a
    /usr/local/lib/libcblas.a
    /usr/local/lib/libcfitsio.a
    /usr/local/lib/libf77blas.a
    /usr/local/lib/libfftw3.a
    /usr/local/lib/libfftw3_threads.a
    /usr/local/lib/libfftw3f.a
    /usr/local/lib/libfftw3f_threads.a
    /usr/local/lib/libfrtbegin.a
    /usr/local/lib/libg2c.a
    /usr/local/lib/libgfortran.a
    /usr/local/lib/libgmp.a
    /usr/local/lib/libgomp.a
    /usr/local/lib/libiberty.a
    /usr/local/lib/libitm.a
    /usr/local/lib/liblapack.a
    /usr/local/lib/libmpc.a
    /usr/local/lib/libmpfr.a
    /usr/local/lib/libntfs-3g.a
    /usr/local/lib/libntfs.a
    /usr/local/lib/libptcblas.a
    /usr/local/lib/libptf77blas.a
    /usr/local/lib/libquadmath.a
    /usr/local/lib/libssp.a
    /usr/local/lib/libssp_nonshared.a
    /usr/local/lib/libstdc++.a
    /usr/local/lib/libsupc++.a
    /usr/local/lib/libublio.a
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:

    fftw
Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
    cd /usr/local/Library && git stash && git clean -f
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

    brew install gmp harfbuzz icu4c libmpc mpfr

Run `brew missing` for more details.

提前感谢您的帮助!

解决方案

它在错误消息中指出了问题所在;

Warning: /usr/local/include isn't writable
You should probably change the ownership and permissions of /usr/local

返回您的用户帐户.

如果运行ls -l /usr/local/,则应具有以下输出:

total 4
-rw-r--r--    1 user  admin    493 23 Apr 15:14 CONTRIBUTING.md
drwxr-xr-x   17 user  admin    578  5 May 14:54 Cellar
drwxr-xr-x    3 user  admin    102 23 Apr 16:33 Frameworks
drwxr-xr-x   10 user  admin    340 24 Apr 08:50 Library

其中user是您的用户名,而admin是您的组.如果您看到更多类似的内容:

drwxr-xr-x   17 root  wheel    578  5 May 14:54 Cellar

您将必须运行chown -R user:admin /usr/local,这将把所有权改回您的用户.

这应该解决第一部分.但是,请注意,如果您以前运行过"sudo make install" software that isn't managed by Homebrew.

,这可能会停止其他软件的运行.

我该如何解决啤酒医生错误,这也解决了您的DYLD_LIBRARY_PATH问题. /p>

I installed homebrew a long time ago and I don't use it that much, but I was thinking of starting to get back into it as it's a very useful and easy to use package installer. Anyway, I ran the brew doctor and got a whole host of warnings which I'm not sure how to fix! I'm especially scared of deleting .dylib, .la and .pc files, in case my packages that weren't installed via homebrew needed them. Any help on the issue would be greatly appreciated, if it matters I'm running Mac OS X Mountain Lion (10.8.3), my list of warnings is as follows:

UOS-12044:~ as34g12$ brew doctor
Warning: /usr/local/include isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.

If a brew tries to write a header file to this directory, the install will
fail during the link step.

You should probably `chown` /usr/local/include
Warning: /usr/local/share isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.

If a brew tries to write a file to this directory, the install will
fail during the link step.

You should probably `chown` /usr/local/share
Warning: Some directories in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/locale
    /usr/local/share/locale/be
    /usr/local/share/locale/be/LC_MESSAGES
    /usr/local/share/locale/ca
    /usr/local/share/locale/ca/LC_MESSAGES
    /usr/local/share/locale/da
    /usr/local/share/locale/da/LC_MESSAGES
    /usr/local/share/locale/de
    /usr/local/share/locale/de/LC_MESSAGES
    /usr/local/share/locale/el
    /usr/local/share/locale/el/LC_MESSAGES
    /usr/local/share/locale/es
    /usr/local/share/locale/es/LC_MESSAGES
    /usr/local/share/locale/fr
    /usr/local/share/locale/fr/LC_MESSAGES
    /usr/local/share/locale/ja
    /usr/local/share/locale/ja/LC_MESSAGES
    /usr/local/share/locale/nl
    /usr/local/share/locale/nl/LC_MESSAGES
    /usr/local/share/locale/sv
    /usr/local/share/locale/sv/LC_MESSAGES
    /usr/local/share/locale/tr
    /usr/local/share/locale/tr/LC_MESSAGES
Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
Warning: Setting DYLD_LIBRARY_PATH can break dynamic linking.
You should probably unset it.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
    /Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
    /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
    /soft/star-hikianalia/bin/gsl-config
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/libatomic.1.dylib
    /usr/local/lib/libg2c.0.0.0.dylib
    /usr/local/lib/libgcc_ext.10.4.dylib
    /usr/local/lib/libgcc_ext.10.5.dylib
    /usr/local/lib/libgcc_s.1.dylib
    /usr/local/lib/libgfortran.3.dylib
    /usr/local/lib/libgomp.1.dylib
    /usr/local/lib/libitm.1.dylib
    /usr/local/lib/libmacfuse_i32.2.dylib
    /usr/local/lib/libmacfuse_i64.2.dylib
    /usr/local/lib/libntfs-3g.80.dylib
    /usr/local/lib/libntfs.9.0.0.dylib
    /usr/local/lib/libosxfuse_i32.2.dylib
    /usr/local/lib/libosxfuse_i64.2.dylib
    /usr/local/lib/libquadmath.0.dylib
    /usr/local/lib/libssp.0.dylib
    /usr/local/lib/libstdc++.6.dylib
    /usr/local/lib/libublio.1.dylib
Warning: Unbrewed .la files 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 .la files:
    /usr/local/lib/libatomic.la
    /usr/local/lib/libfftw3.la
    /usr/local/lib/libfftw3_threads.la
    /usr/local/lib/libfftw3f.la
    /usr/local/lib/libfftw3f_threads.la
    /usr/local/lib/libg2c.la
    /usr/local/lib/libgfortran.la
    /usr/local/lib/libgmp.la
    /usr/local/lib/libgomp.la
    /usr/local/lib/libitm.la
    /usr/local/lib/libmpc.la
    /usr/local/lib/libmpfr.la
    /usr/local/lib/libntfs-3g.la
    /usr/local/lib/libntfs.la
    /usr/local/lib/libosxfuse_i32.la
    /usr/local/lib/libosxfuse_i64.la
    /usr/local/lib/libquadmath.la
    /usr/local/lib/libssp.la
    /usr/local/lib/libssp_nonshared.la
    /usr/local/lib/libstdc++.la
    /usr/local/lib/libsupc++.la
    /usr/local/lib/libublio.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/cfitsio.pc
    /usr/local/lib/pkgconfig/fftw3.pc
    /usr/local/lib/pkgconfig/fftw3f.pc
    /usr/local/lib/pkgconfig/libntfs-3g.pc
    /usr/local/lib/pkgconfig/libublio.pc
    /usr/local/lib/pkgconfig/osxfuse.pc
Warning: Unbrewed static libraries 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 static libraries:
    /usr/local/lib/libatlas.a
    /usr/local/lib/libatomic.a
    /usr/local/lib/libcblas.a
    /usr/local/lib/libcfitsio.a
    /usr/local/lib/libf77blas.a
    /usr/local/lib/libfftw3.a
    /usr/local/lib/libfftw3_threads.a
    /usr/local/lib/libfftw3f.a
    /usr/local/lib/libfftw3f_threads.a
    /usr/local/lib/libfrtbegin.a
    /usr/local/lib/libg2c.a
    /usr/local/lib/libgfortran.a
    /usr/local/lib/libgmp.a
    /usr/local/lib/libgomp.a
    /usr/local/lib/libiberty.a
    /usr/local/lib/libitm.a
    /usr/local/lib/liblapack.a
    /usr/local/lib/libmpc.a
    /usr/local/lib/libmpfr.a
    /usr/local/lib/libntfs-3g.a
    /usr/local/lib/libntfs.a
    /usr/local/lib/libptcblas.a
    /usr/local/lib/libptf77blas.a
    /usr/local/lib/libquadmath.a
    /usr/local/lib/libssp.a
    /usr/local/lib/libssp_nonshared.a
    /usr/local/lib/libstdc++.a
    /usr/local/lib/libsupc++.a
    /usr/local/lib/libublio.a
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:

    fftw
Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
    cd /usr/local/Library && git stash && git clean -f
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

    brew install gmp harfbuzz icu4c libmpc mpfr

Run `brew missing` for more details.

Thanks in advance for the help!

It states in the error message what the problem is;

Warning: /usr/local/include isn't writable
You should probably change the ownership and permissions of /usr/local

back to your user account.

If you run ls -l /usr/local/ you should have an output like this:

total 4
-rw-r--r--    1 user  admin    493 23 Apr 15:14 CONTRIBUTING.md
drwxr-xr-x   17 user  admin    578  5 May 14:54 Cellar
drwxr-xr-x    3 user  admin    102 23 Apr 16:33 Frameworks
drwxr-xr-x   10 user  admin    340 24 Apr 08:50 Library

Where user is your username and admin is your group. If you see something more like:

drwxr-xr-x   17 root  wheel    578  5 May 14:54 Cellar

you will have to run chown -R user:admin /usr/local which will change the ownership back to your user.

This should solve the first part. However, be warned, this could stop other software working if you have previously run "sudo make install" software that isn't managed by Homebrew.

There is also a great answer on How do i fix brew doctor errors that addresses your DYLD_LIBRARY_PATH issues.

这篇关于自制:酿造医生抛出很多错误,我该如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆