首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >自制警告?

自制警告?
EN

Stack Overflow用户
提问于 2015-05-21 02:37:26
回答 1查看 1.4K关注 0票数 0

刚刚安装了Homebrew,但由于某些原因,当我做"brew医生“时,我不断收到这些警告,当我运行它给我的命令chown时,什么也没有发生……

代码语言:javascript
复制
 > 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: /usr/local/include isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/include

Warning: /usr/local/lib isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/lib

Warning: /usr/local/lib/pkgconfig isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/lib/pkgconfig

Warning: /usr/local/sbin isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/sbin

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/man8

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/libntfs-3g.80.dylib
    /usr/local/lib/libntfs.9.0.0.dylib
    /usr/local/lib/libublio.1.dylib

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

Unexpected header files:
    /usr/local/include/ntfs/attrib.h
    /usr/local/include/ntfs/attrlist.h
    /usr/local/include/ntfs/bitmap.h
    /usr/local/include/ntfs/bootsect.h
    /usr/local/include/ntfs/collate.h
    /usr/local/include/ntfs/compat.h
    /usr/local/include/ntfs/compress.h
    /usr/local/include/ntfs/debug.h
    /usr/local/include/ntfs/device.h
    /usr/local/include/ntfs/device_io.h
    /usr/local/include/ntfs/dir.h
    /usr/local/include/ntfs/endians.h
    /usr/local/include/ntfs/gnome-vfs-method.h
    /usr/local/include/ntfs/gnome-vfs-module.h
    /usr/local/include/ntfs/index.h
    /usr/local/include/ntfs/inode.h
    /usr/local/include/ntfs/layout.h
    /usr/local/include/ntfs/lcnalloc.h
    /usr/local/include/ntfs/list.h
    /usr/local/include/ntfs/logfile.h
    /usr/local/include/ntfs/logging.h
    /usr/local/include/ntfs/mft.h
    /usr/local/include/ntfs/mst.h
    /usr/local/include/ntfs/ntfstime.h
    /usr/local/include/ntfs/rich.h
    /usr/local/include/ntfs/runlist.h
    /usr/local/include/ntfs/security.h
    /usr/local/include/ntfs/support.h
    /usr/local/include/ntfs/tree.h
    /usr/local/include/ntfs/types.h
    /usr/local/include/ntfs/unistr.h
    /usr/local/include/ntfs/version.h
    /usr/local/include/ntfs/volume.h
    /usr/local/include/ntfs-3g/acls.h
    /usr/local/include/ntfs-3g/attrib.h
    /usr/local/include/ntfs-3g/attrlist.h
    /usr/local/include/ntfs-3g/bitmap.h
    /usr/local/include/ntfs-3g/bootsect.h
    /usr/local/include/ntfs-3g/cache.h
    /usr/local/include/ntfs-3g/collate.h
    /usr/local/include/ntfs-3g/compat.h
    /usr/local/include/ntfs-3g/compress.h
    /usr/local/include/ntfs-3g/debug.h
    /usr/local/include/ntfs-3g/device.h
    /usr/local/include/ntfs-3g/device_io.h
    /usr/local/include/ntfs-3g/dir.h
    /usr/local/include/ntfs-3g/efs.h
    /usr/local/include/ntfs-3g/endians.h
    /usr/local/include/ntfs-3g/index.h
    /usr/local/include/ntfs-3g/inode.h
    /usr/local/include/ntfs-3g/layout.h
    /usr/local/include/ntfs-3g/lcnalloc.h
    /usr/local/include/ntfs-3g/logfile.h
    /usr/local/include/ntfs-3g/logging.h
    /usr/local/include/ntfs-3g/mft.h
    /usr/local/include/ntfs-3g/misc.h
    /usr/local/include/ntfs-3g/mst.h
    /usr/local/include/ntfs-3g/ntfstime.h
    /usr/local/include/ntfs-3g/object_id.h
    /usr/local/include/ntfs-3g/param.h
    /usr/local/include/ntfs-3g/reparse.h
    /usr/local/include/ntfs-3g/runlist.h
    /usr/local/include/ntfs-3g/security.h
    /usr/local/include/ntfs-3g/support.h
    /usr/local/include/ntfs-3g/types.h
    /usr/local/include/ntfs-3g/unistr.h
    /usr/local/include/ntfs-3g/volume.h
    /usr/local/include/ublio.h

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/libntfs-3g.la
    /usr/local/lib/libntfs.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/libntfs-3g.pc
    /usr/local/lib/pkgconfig/libublio.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/libntfs-3g.a
    /usr/local/lib/libntfs.a
    /usr/local/lib/libublio.a

Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
    /sw/bin/    /usr/local/    /usr/local/bin/
EN

回答 1

Stack Overflow用户

发布于 2015-05-22 06:59:53

您是否以root/Administrator (在Mac中这样称呼)的身份发布了"brew doctor“?如果没有,请执行以下操作

代码语言:javascript
复制
su Administrator

再试一次。

发出该命令的用户似乎没有在/usr/local/子目录中写入的权限。管理员应该能够在此目录结构中写入。如果不是这样,那么说明您的系统出了很大的问题(如果您不是在只读磁盘上的话)。

出于系统计算机安全性的考虑,您的用户帐户永远不能写入/usr/或其任何子目录。

然而,可能有理由不让管理员用户直接处理自制软件。如果您想设置一个专门处理自制软件的非管理员用户,例如,您可以尝试this solution。简而言之,他们建议创建一个新用户( homebrew ),删除相关的/usr/子目录,这样它们就归homebrew用户所有(我认为这不是一个好主意,因为它们应该属于admin用户,而且调整组权限并将homebrew添加到admin组中就足够了),并从登录页面中删除homebrew用户。然后,可以设置自制软件,并在发布后使用

代码语言:javascript
复制
su homebrew

关于chown (我不认为这对于手头的问题是必需的,但我想解释一下):chown应该在失败的情况下总是给出一个错误消息。语法是

代码语言:javascript
复制
 chown <new owner> <file or directory>

可选地添加组和多个可能的选项,如man page中所解释的。如果真的什么都没有发生,也没有错误消息,可以使用-v选项来使chown给出详细的输出-在这种情况下,应该详细说明

代码语言:javascript
复制
ownership of <file/directory> retained as <owner> 

代码语言:javascript
复制
changed ownership of <file/directory> from <old owner> to <new owner>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30357836

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档