简体   繁体   English

mac上的usr / local / src不存在吗?

[英]Does usr/local/src on mac not exist?

I am new to computers and using the terminal. 我是电脑新手并使用终端。 Most tutorials I look at for downloading tell me to go to usr/local/src. 我看下载的大多数教程告诉我去usr / local / src。 However, I don't find this on mac. 但是,我在Mac上找不到这个。 Should I just make a directory called src? 我应该创建一个名为src的目录吗?

Or is this something specific only to linux users? 或者这只是针对linux用户的东西?

If someone could tell me how much difference it makes for this directory to exist or not that would be great. 如果有人能告诉我这个目录存在多大差异,那就太好了。 Can I complete my installations in usr/local itself? 我可以在usr / local本身完成我的安装吗?

Thanks 谢谢

Using the Finder, you can press Cmd-Shift-G and type /usr to display that folder. 使用Finder,您可以按Cmd-Shift-G并键入/usr以显示该文件夹。 The /local folder is there by default, but not its /src subfolder. /local文件夹默认存在,但不是/src子文件夹。 The Finder, of course, can easily create it for you. 当然,Finder可以轻松地为您创建它。

在此输入图像描述

As @cricket_007 mentioned, you need to be certain of what you're doing in this area of the system — that's why OS X doesn't display those folders by default. 正如@ cricket_007所提到的,您需要确定您在系统的这个区域正在做什么 - 这就是为什么OS X默认情况下不显示这些文件夹的原因。 If you understand the risk and want to see everything in the Finder, you can issue the following Terminal command: 如果您了解风险并希望查看Finder中的所有内容,则可以发出以下终端命令:

defaults write com.apple.finder AppleShowAllFiles YES

... then type: ...然后键入:

killall Finder

and it will look like this. 它看起来像这样。 The hidden folders have a slightly faded appearance, but you can navigate into them as desired: 隐藏文件夹的外观稍微褪色,但您可以根据需要导航到它们: 在此输入图像描述

Alternatively (for High Sierra and above) 或者(适用于High Sierra及以上)

You may simply use the key combination: " Cmd Shift > " to toggle on and off hidden file display. 您可以简单地使用组合键:“ Cmd Shift> ”来打开和关闭隐藏文件显示。

It depends what you are doing. 这取决于你在做什么。 If you're messing about just create one in your home directory: 如果你搞乱只是在你的主目录中创建一个:

$ cd ~
$ mkdir src

If you building stuff via configure etc., and you want to install it into /usr/local (the default install prefix), then just do this: 如果你通过configure等构建东西,并且想要将它安装到/usr/local (默认安装前缀),那么就这样做:

$ cd ~/src/packagename
$ ./configure ... options ...
$ make
$ sudo make install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Mac 上删除 usr/local/octave - Deleting usr/local/octave on Mac Mac OS上的Docker / usr / src / app路径 - Docker /usr/src/app path on Mac OS 安装后logstash /usr/local/etc/logstash/conf.d/文件夹不存在 - Logstash /usr/local/etc/logstash/conf.d/ folder does not exist after installation 如何在 Mac 上的 $PATH 中添加 /usr/local/bin - How to add /usr/local/bin in $PATH on Mac 自制链接python到/ usr / local / bin /在Mac上 - Homebrew link python to /usr/local/bin/ on Mac 错误:/usr/local/Cellar/sqoop/1.4.6 /../ hadoop不存在! 请将$ HADOOP_COMMON_HOME设置为Hadoop安装的根目录 - Error: /usr/local/Cellar/sqoop/1.4.6/../hadoop does not exist! Please set $HADOOP_COMMON_HOME to the root of your Hadoop installation 在 mac 上,g++ (clang) 默认搜索 /usr/local/include 和 /usr/local/lib 失败 - On mac, g++ (clang) fails to search /usr/local/include and /usr/local/lib by default 尝试在 Mac OS X 10.7.5 上的 usr/local/bin 中安装 composer - Trying to Install composer in usr/local/bin on Mac OS X 10.7.5 Mac上的gdb python:“ / usr / local / bin / python”错误:不在可执行格式中 - gdb python on mac: error of “/usr/local/bin/python”: not in executable format Mac的Git安装程序:为什么/ usr / local / git / bin在我的PATH中? - Git installer for Mac: Why is /usr/local/git/bin in my PATH?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM