在我在我的MacBook上安装Go之后,我该如何找到它的位置?

huangapple go评论81阅读模式
英文:

After I installed my Go in my macbook, how can I find the place of it?

问题

在我使用以下命令安装Go后:

brew install go

在我的Mac上安装了Go,并且给出了一个摘要:

==> Summary
🍺  /usr/local/Cellar/go/1.8.1: 7,030 files, 281.8MB  

但是在我的Finder中找不到local目录。

如何在我的Mac上找到已安装的Go库?

英文:

After I use :

brew install go

Installed my Go in my mac, and it give a Summary:

==> Summary
🍺  /usr/local/Cellar/go/1.8.1: 7,030 files, 281.8MB  

But in my finder I can not find the local directory.

在我在我的MacBook上安装Go之后,我该如何找到它的位置?

How to find my installed Go library in my mac?

答案1

得分: 1

所有类似这个的帖子都指出:

> 这个目录是隐藏的,因为它是一个系统目录,用户没有必要在其中进行任何更改。
>
> 要在Finder中显示它,请在Finder中输入<kbd>command</kbd><kbd>shift</kbd><kbd>g</kbd>,然后在弹出的窗口中输入

/usr/local
英文:

All threads like this one point out that:

> This directory is hidden as it's a system directory and users have no need to change anything in it.
>
> To expose it in finder enter <kbd>command</kbd><kbd>shift</kbd><kbd>g</kbd> in finder and in the resulting popup enter

/usr/local

答案2

得分: 1

你可以使用brew --prefix <formula>命令获取任何Homebrew公式的前缀。即使该公式未安装,它也会显示它如果安装的话会在哪里。

$ brew --prefix go
/usr/local/opt/go

你可以使用open命令从终端打开Finder中的任何目录,所以你只需要执行以下命令:

open $(brew --prefix go)
英文:

You can get the prefix of any Homebrew formula with brew --prefix &lt;formula&gt;. Even if the formula isn’t installed it’ll show where it’d be if it were.

$ brew --prefix go
/usr/local/opt/go

You can open any directory in the Finder from your terminal using open, so all you have to do is:

open $(brew --prefix go)

答案3

得分: 0

请查看这个链接:https://discussions.apple.com/thread/5418731?tstart=0

从Finder的"前往"菜单中选择"前往文件夹",并将路径设置为/usr/local/。

英文:

Please look at this https://discussions.apple.com/thread/5418731?tstart=0

Choose Go to Folder from the Finder's Go menu and provide /usr/local/ as the path.

答案4

得分: 0

有一件事需要注意,根据附图,你正在查看的是你的 /User 文件夹,而不是 /usr 文件夹。

英文:

One thing that should be noted is that, based on the attached image, you were looking in your /User folder which is not the same as /usr.

huangapple
  • 本文由 发表于 2017年4月14日 12:00:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/43405001.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定