Welcome to WebmasterWorld Guest from

Forum Moderators: travelin cat

Message Too Old, No Replies

installing to /usr/local/bin

can someone explain?


too much information

7:06 pm on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I am trying to install asp2php on my G4 and can't get past this step. The instructions say to go to a terminal window and then type:
cp asp2php /usr/local/bin

but I get a permission denied. So I tried:
sudo cp asp2php /usr/local/bin

which looks like it works but nothing. So I tried to change directories to /usr/local/bin to see what was there and aparently 'bin' is not a directory, so how is a cp command supposed to work anyway?

if anyone has spent more time behind a unix box and can help I would really appreciate it.


8:08 pm on Jan 27, 2005 (gmt 0)

10+ Year Member

CP is a simple "copy file" command. You tell unix to CP a file :

cp asp2php /usr/local/bin

is trying to copy the file asp2php to the usr/local/bin folder. My guess is that the directory may not be specified... ie:

cp /user/john/desktop/asp2php \usr\local\bin

I don't think you not having a bin is the problem, however if you want to check this, you can download a free tool called TinkerTool. (Google it, you'll find it.) Use it to "Show hidden and system files". Then you should be able to navigate to Macintosh HD\usr\local\bin in OSX and see if it exists.

Hope this helps you :0)

-- Zak

<added> Oh and if you use TinkerTool, be sure to hit the "Relaunch Finder" button after any changes to see them imediatly... </added>

too much information

8:18 pm on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

thanks, that will definately help.

(it has been a long time since I had to do things with the command line only, I feel like I'm working in the dark.)


8:45 pm on Jan 27, 2005 (gmt 0)

10+ Year Member

/usr/local/bin is one of the 'standard' *nix folders for extra programs installed by the local (super-)user. *nix programs are usually stored in folders with either the name 'bin' or 'sbin'

You can find all of the 'bin' and 'sbin' folders by running these commands:

sudo find / -type d -iname 'bin'
sudo find / -type d -iname 'sbin'

If /usr/local/bin doesn't excist you can easily create it with this command:

sudo mkdir -pv /usr/local/bin

If /usr/local/bin didn't exist, I'm at a loss to explaining why 'cp' didn't complain.

too much information

8:57 pm on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

that's the thing, it does exist, I can navigate to the /usr/local/ directory and see 'bin' when I type 'ls' but I can't navigate into it because it doesn't seem to be a folder, so I can't verify that the file was copied.

I have rebooted and still the install checker does not verify that it was installed. The only part that bothers me is that I can't see if it is working and maybe something else is the problem.

I also tried the mkdir, but wasn't allowed to do that. I'm not in front of the machine, or I would be able to give the reason. (It was 1:30am)


9:49 am on Jan 28, 2005 (gmt 0)

10+ Year Member

aparently 'bin' is not a directory

If there was no directory called bin, the the copy command you used would have copied the file asp2php to a file called bin in the /usr/local directory. When what you wanted was to copy the file asp2php to a file called asp2php in the /usr/local/bin directory.

Check if the size and dates of asp2php file and bin file are the same, and if so, delete the bin file, create a bin directory, and re-copy the asp2php file.


12:55 am on Jan 29, 2005 (gmt 0)

10+ Year Member

All right ...
You've got two ways of checking up on what's in /usr/local/bin:

1) using the Terminal -

ls -aloF /usr/local/

there has to be a 'd' in the first column and a '/' at the end of the line for "bin"

2) using Finder:

menu:Go => Go to Folder ...

This will bring up the /usr/local/ folder in Finder even though it's normally hidden.

too much information

12:13 pm on Feb 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Well, so far I have determined that the bin is not a directory but a file. So I tried to create a bin directory and this is the result:

sudo mkdir -pv /usr/local/bin
mkdir: illegal option -- v

then dropping the 'v' I get this:

sudo mkdir -p /usr/local/bin
mkdir: /usr/local/bin: Not a directory

and dropping all of the options:

sudo mkdir /usr/local/bin
mkdir: /usr/local/bin: File exists

So I think that the bin file that I have is something I accidently created while trying to do this. But now I can't think of the commands for erasing or renaming files.

I really need to get into the terminal window more often...


5:08 pm on Feb 1, 2005 (gmt 0)

10+ Year Member

you can't have two files with the same name (and a folder is in Unix terms actually a file).

The remove command is

sudo rm -f <file>

rename is

mv <oldfile> <newfile>

too much information

5:22 pm on Feb 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Woo Hoo! I finally got it.

Thanks for all of the help. I was trying every combination of commands I could think of, but the 'rm' is what it took to kill the bin file.

One day when I get some time I will have to start studying up on my unix again.


Featured Threads

Hot Threads This Week

Hot Threads This Month