自制的未做文件 [英] Homebrew unbrewed files

查看:74
本文介绍了自制的未做文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用自制软件安装python,最后使它工作.在尝试进行这项工作的过程中,我跑了:

I've been trying to use homebrew to install python and finally gotten that to work. In the process of trying to make that work I ran:

brew list --unbrewed

并获得了大量文件列表(超过59,000个).这些文件主要与python,node,ruby,mongo和mysql有关.我也运行过brew更新和brew医生,但是这些都不会对未列出的列表产生任何影响.

and got a huge list of files (over 59,000). These files are mostly related to python, node, ruby, mongo and mysql. I've also run brew update and brew doctor and neither one of those have any effect on the unbrewed list.

让安装保持这种状态似乎不是一个好主意.所以我想我对此有几个疑问:

It seems like not such a great idea to keep my installation in this state. So I guess I have several questions about this:

1)这是我应该担心或解决的问题吗?

1) Is this something that I should worry about or fix?

2)未整理的文件存放在哪里? (我正在寻找有关此文档,但找不到它).这些文件中有许多在显示的路径中不存在,所以它们在哪里?

2) Where are the unbrewed files kept? (I looked for documentation on this but couldn't find it). Many of these files don't exist at the path shown so where are they?

3)如果我确实想清理该怎么办?我最终将删除这些软件包/公式的安装吗?

3) If I did want to clean this up how would I do so? And will I end up removing my installations of these packages/formulas?

推荐答案

这没什么好担心的. Homebrew旨在与安装在/usr/local/中的其他程序很好地配合使用,这是用户构建软件的标准位置.还有很多其他的东西安装在那里. brew list --unbrewed命令仅列出下的所有所有文件,而这些文件不是Homebrew存放的文件.它不是对实际问题的诊断,它更多是用于标识您可能希望放入自制"公式下的内容,或帮助公式维护人员在执行安装工作时检查杂散文件.任何正常系统都可能具有非空的brew list --unbrewed.

This is nothing to worry about. Homebrew is designed to play well with other things that install in to /usr/local/, which is the standard place for user-built software to go. Plenty of other things install themselves there. The brew list --unbrewed comamnd just lists all the files under /usr/local which weren't put there by Homebrew. It is not diagnostic of an actual problem, it's more for identifying stuff you might want to put under a Homebrew formula, or to help formula maintainers check for stray files while doing installation work. Any normal system will probably have a nonempty brew list --unbrewed.

改为执行brew doctor.那会检查/usr/local下某些位置的文件,这实际上可能是有问题的.如果brew doctor抱怨某事,则可能需要解决.否则,不必担心它们,也不要尝试清理它们-您可能出于某种原因将它们放在了那里.

Do a brew doctor instead. That checks for files in certain places under /usr/local which could actually be problematic. If brew doctor complains about something, you probably need to address that. Otherwise, don't worry about them, and don't try to clean them up - you probably put those files there for a reason.

这是我的测试10.8.3系统报告的示例. --unbrewed文件很多,但是doctor很高兴.自酿就可以了.

Here's an example of what my test 10.8.3 system reports. Plenty of --unbrewed files, but doctor is happy. Homebrew is functioning just fine on it.

$ brew list --unbrewed | wc
    1721    1727   82663
$ brew doctor
Your system is ready to brew.

所以:

1)不,除非brew doctor告知您,否则不要担心或修复它.删除这些文件可能会破坏您安装的内容.

1) No, don't worry about this or fix it unless brew doctor tells you to. Removing these files will probably break something you installed.

2)这些路径相对于brew --prefix,可能是/usr/local.

2) Those paths are relative to brew --prefix, which is probably /usr/local.

3)假设,要清理"每个文件,只需确定要安装的文件并卸载它,如果确实需要,可以使用Homebrew公式重新安装它,或者得出结论:是一个错误或不再需要,请将其删除.没有标准或简单的方法可以做到这一点.而这正是Homebrew和其他程序包管理器所要解决的问题.

3) Hypothetically, to "clean it up", for each file, you'd just determine what installed it and uninstall it, reinstalling it using a Homebrew formula if it's something you actually need, or come to a conclusion that it was a mistake or no longer needed, and delete it. There's no standard or easy way to do this. And that is exactly the problem that Homebrew and other package managers exist to solve.

如果您想更广泛地使用Homebrew来控制您的安装,则其中的某些内容可能是值得的.每次您要安装将自己粘贴在/usr/local/中的某些非Homebrew软件时,请按照brew create为其计算公式,而不是按照常规的安装说明进行操作.然后自制软件将跟踪其安装的文件.

Some of that might be worthwhile if you want to use Homebrew more extensively to control your installations. Each time you're about to install some non-Homebrew software that sticks itself in /usr/local/, instead of following the normal installation instructions, use brew create to make a formula for it. Then homebrew will track the files it installs.

这篇关于自制的未做文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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