0

I have a new mac mini with snow leopard.

When I enter the following into the terminal: cd /usr/local I get this error message: -bash: cd: /usr/local: No such file or directory

I am not sure why?

2
  • The directory does not exist. Why don't you believe the error message? If you need it, create it. sudo mkdir /usr/local
    – EmmEff
    Dec 17, 2009 at 18:03
  • Why do you expect it to exist?
    – raphink
    Dec 17, 2009 at 20:00

4 Answers 4

4

You're getting this error because the directory /usr/local does not exist. I don't have a Snow Leopard install in front of me right now, but it's entirely possible that this directory doesn't exist by default -- nothing would be installed there in a stock install.

1
  • 3
    /usr/local doesn't exist by default on OS X.
    – mipadi
    Dec 17, 2009 at 20:28
0

Try this command in the terminal instead: ls /usr

This lists the contents of the /usr directory.

Do you see "local" is in the list of directories in /usr? If not, it doesn't exist and that's why you can't cd to /usr/local.

0

If you would like to create the directory /usr/local you can enter >

sudo mkdir /usr/local

You will need to enter your password, because the directory /usr is most likely owned by the user root. This command will warn you and do nothing if /usr/local already exists.

0

By default (and thus on new installations) there is no /usr/local/. This explains why you get the message No such file or directory.

If you want to create it go to /usr and use mkdir local. (or, if the logged in account has insufficient rights: sudo mkdir /usr/local.

You must log in to answer this question.