bash Homebrew 是最新的,但我是否需要担心“无法链接”+“删除路径”错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41886052/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 15:40:07  来源:igfitidea点击:

Homebrew up-to-date, but do I need to worry about `could not link` + `delete path` errors?

bashunixhomebrew

提问by HashRocketSyntax

I've used homebrew to install rvm and ocaml packages successfully, but I've always wondered about the errors at the end of $ brew updateoutput. For example, when I ran it just now the bash output was:

我已经使用 homebrew 成功安装了 rvm 和 ocaml 包,但我一直想知道$ brew update输出结束时的错误。例如,当我刚刚运行它时,bash 输出是:

Error: Could not link:
/usr/local/etc/bash_completion.d/brew

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/doc/homebrew

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/zsh/site-functions/_brew

Please delete these paths and run `brew update`.
Error: Could not link:
/usr/local/share/man/man1/brew-cask.1
/usr/local/share/man/man1/brew.1

My colleagues say not to worry about it, but... I worry about it. What can I do to fix them? Just run rmand completely obliterate the "delete me" paths, and mkdirthe paths that cannot be linked?

我的同事说不用担心,但是……我担心。我能做些什么来修复它们?就跑rm,彻底抹掉“删除我”的路径,以及mkdir无法链接的路径?

回答by equal-l2

All the specified files are just symlinks, so don't worry, just remove them.

所有指定的文件都只是符号链接,所以不用担心,只需删除它们即可。

To make sure that they are symlinks, you can run this:

要确保它们是符号链接,您可以运行以下命令:

file -h <what you want to inspect>

回答by Atul Kaushik

This worked for me:

这对我有用:

../usr/local/..$rm -rf /usr/local/share/doc/homebrew

and then

进而

../usr/local/..$brew upgrade

回答by Piyush

Just try to remove the path which showed on your terminal

只需尝试删除终端上显示的路径

$ rm -rf [path]

$ rm -rf [路径]

Example: $ rm -rf /usr/local/share/doc/homebrew

示例:$ rm -rf /usr/local/share/doc/homebrew

回答by Vivek Tamrakar

rm -rf FILE_NAME

rm -rf 文件名

In your case it should be as follows

在你的情况下,它应该如下

rm -rf /usr/local/etc/bash_completion.d/brew

rm -rf /usr/local/etc/bash_completion.d/brew

rm -rf /usr/local/share/doc/homebrew

rm -rf /usr/local/share/doc/homebrew

rm -rf /usr/local/share/zsh/site-functions/_brew and so on

rm -rf /usr/local/share/zsh/site-functions/_brew 等等