【mac 没有opt目录】很多教程告诉你安装或者创建文件在opt目录下,他们默认mac也是有opt目录的,其实mac系统默认是没有opt目录的,所以你找了半天也找不到,除非有软件自己创建了它,或者你只能自己创建了。
参见:
Can't find /opt directory on mac os 10.7.5
Hello!
My system is Mac OS X 10.7.5 Mac-Book-Pro. I am currently struggling with setting up the correct php version, which I have recently installed - php 5.5.37;
the old, preinstalled one, is 5.3.28;
I have managed to get to the stage at which php -v command reveals a correct 5.5.37 version;
but both
http://localhost/~user/phpmya... andhttp://localhost/~user/phpinf... the old 5.3.28 version.
One of tutorials I have found advice to add LoadModule php5_module /opt/local/apache2/modules/mod_php55.so to httpd.conf file. But I can't add this line because I can't even find /opt directory to see what is in there.
-bash: cd: /opt/: No such file or directory
-bash: cd: /opt/local/etc: No such file or directory
Is it possible that I don't have this directory? How can I deal with this issue?
I am a newbie in programming, and will be grateful for detailed help - I have been struggling with these issues for more than a week.
Thank you very much!
MacBook Pro, Mac OS X (10.7.5), Xcode 4.6.3
Posted on Jul 18, 2016 3:53 AM
https://discussions.apple.com...
Your system will only have that folder if you've installed software which creates it;
none of the core Mac OS X components use it. If desired, create it manually.
(143534)