[英]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:
隐藏文件夹的外观稍微褪色,但您可以根据需要导航到它们:
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.