PDA

View Full Version : command line stuff!




CrackedButter
Jun 1, 2003, 01:23 PM
I'm trying to install a peice of software via the terminal but i'm hitting a snag which is restricting me. It seems i am being denied to do things on my own system and i cannot understand why when i have (i think) changed permissions for myself so i can perform simple command line instructions.

The program is called "Throttled", its folder is called "throttled-source" and its inside this folder on my system: /Users/johnjkmorris/Desktop/To\ Save/Downloaded/throttled-source

One i am inside that folder (dragging the folder to the terminal) i then type "make" as per the instructions in the read me file.

As explained here:"Configuring and installing throttled -

1. cd to the directory containing throttled in the terminal
2. type "make"
3. type "sudo make install"

But whenever i type "make" i get "Permission denied", i cannot understand why and that is the problem, i'm not asking for help on the installation of the program i merely want permission to install it.

I have tried looking in my "Mac OS X The Missing Manual" manuals index for admin settings and privledges and made some changes, i gave myself Read & Write access but i still get this permission denied feedback.



zimv20
Jun 1, 2003, 01:49 PM
% which make
% ls -als `which make`

if the result is something like


8 lrwxr-xr-x 1 root wheel 7 May 14 17:41 /usr/bin/make@ -> gnumake


then also do

% ls -als /usr/bin/gnumake

visor
Jun 1, 2003, 02:03 PM
just in case you don't know.

so if you don't see an 'admin' next to your name in the user preferences, you won't be able to run sudo.

also make sure you are the same user that unpacked the archive, and that you are actually in the directory that contains the Makefile

CrackedButter
Jun 1, 2003, 02:55 PM
Hey i installed this OS my this iBook and only i use it, how do i get admin rights?

In linux you could type a four letter word then password to verify you were the admin while being in user mode.

Can you not do this in OSX.
(i forgot the four letter word) btw ;)

zimv20
Jun 1, 2003, 03:01 PM
Originally posted by CrackedButter
Hey i installed this OS my this iBook and only i use it, how do i get admin rights?

that's not the problem. run the commands i listed above and report back.

visor
Jun 1, 2003, 03:06 PM
No problem, if you are the only user you'll be the admin by default.

if you need root priveleges, you can type

sudo su
enter your user password

you should then be root. if your passwd isn't accepted you're no admin after all... go and find your admin to give you the priveleges ;)
(in other words, you're doomed)

you usually can't login as root, for the root account is disabled by default.

what you have to do to enable it, is go to the netinfomgr, and enable the root login. Don't mess about to much with netinfo - that can really mess up your system if you don't know how to use it.

CrackedButter
Jun 1, 2003, 03:11 PM
Originally posted by zimv20
that's not the problem. run the commands i listed above and report back.

I am the admin now, thanks for reminding me of the command.

I typed what you asked and i get "to many arguments"

zimv20
Jun 1, 2003, 03:16 PM
Originally posted by CrackedButter

I typed what you asked and i get "to many arguments"

????

i need to see the input & output.

Doctor Q
Jun 1, 2003, 03:19 PM
Originally posted by CrackedButter
I am the admin now, thanks for reminding me of the command.

I typed what you asked and i get "to many arguments" Maybe you didn't spot the backquotes in the command suggested by zimv20. Try it one command at a time. What response did "which make" produce?

CrackedButter
Jun 1, 2003, 03:27 PM
"which make" gave me "Command not found"

as did "Is" and "-als"

i'm still new to the command line btw so i don't know nearly enough as much as i should.

zimv20
Jun 1, 2003, 03:33 PM
Originally posted by CrackedButter
"which make" gave me "Command not found"

as did "Is" and "-als"

i'm still new to the command line btw so i don't know nearly enough as much as i should.

it's ls (ell-ess)

works better if you cut/paste from my post.

have you installed the developer tools from that grey CD included w/ jaguar? you need that to run make, iirc.

Doctor Q
Jun 1, 2003, 03:38 PM
To determine why you are getting "Command not found", I suggest typing these two commands and telling us the results:

echo $SHELL
echo $PATH

zimv20: Remember the old saying "Too many cooks spoil the broth?" I don't want to make things more confusing by stepping on your toes while you are helping CrackedButter. Should I continue to make suggestions and ask questions or should I shut up and stop "helping"?

CrackedButter
Jun 1, 2003, 03:38 PM
Originally posted by zimv20
it's ls (ell-ess)

works better if you cut/paste from my post.

have you installed the developer tools from that grey CD included w/ jaguar? you need that to run make, iirc.

okay i will run the cd to make sure, i'll continue this tomorrow thanks alot for your help.

zimv20
Jun 1, 2003, 03:45 PM
Originally posted by Doctor Q

zimv20: Remember the old saying "Too many cooks spoil the broth?" I don't want to make things more confusing

no worries. good call on the PATH.

i'm wondering how much success one can expect from building something command line if they don't know the 'ls' command.

visor
Jun 1, 2003, 03:57 PM
Originally posted by zimv20
i'm wondering how much success one can expect from building something command line if they don't know the 'ls' command.

depends on the quality of the makefile. And the presence of all shared libs....
and the path...
oh well ;)

maradong
Jun 1, 2003, 04:10 PM
dude, when using sudo, the second command is executed with normal user rights.
use :
su [enter]
enter the password , and do everything in the root mode.
to logoff from root mode just press ctrl-d

zimv20
Jun 1, 2003, 04:10 PM
Originally posted by visor
depends on the quality of the makefile. And the presence of all shared libs....
and the path...
oh well ;)

yeah, there are a lot of things that can go wrong. having a lot of unix experience is sometimes necessary.

rainman::|:|
Jun 1, 2003, 04:58 PM
i think the problem here is that the user doesn't realize the structure and syntax of commands. i'll bet we're talking typos and incorrect characters here.

but yes, one does need to be familiar with the terminal and basic commands to use command line utilities. it's just common sense...

pnw

zimv20
Jun 1, 2003, 05:05 PM
Originally posted by paulwhannel
i'll bet we're talking typos and incorrect characters here.


very likely.

hey crackedbutter, make sure you cut/paste the commands from our posts, then _please_ cut/paste (from you own terminal window) what you fed to the shell and the output of the commands.

otherwise, it'll be next to impossible to help you. (unless you want to give me ssh access to your machine...)

Doctor Q
Jun 1, 2003, 06:37 PM
On a few occasions, I've talked a Unix beginner through a command-line operation over the phone. I say to type "ls -l" and he/she types "ellis-L". Some people type "\" when you say to type a slash (the effect of Windows misconditioning). Not everyone agrees on the English names for characters like * and # and ! and ', which adds to the fun. We always get through it eventually, but it might take many minutes to get through a command like this:

find ~ -name '*.doc' -print

At least here we can type examples and use cut and paste.

zimv20
Jun 1, 2003, 09:18 PM
Originally posted by Doctor Q
Not everyone agrees on the English names for characters like * and # and ! and ', which adds to the fun.

splat, pound, bang and tick are what i call those.

Doctor Q
Jun 1, 2003, 11:11 PM
Originally posted by Doctor Q
Not everyone agrees on the English names for characters like * and # and ! and 'Originally posted by zimv20
splat, pound, bang and tick are what i call those. Well, that proves my point! I call them star, hash, bang, and single quote! I also say

~ squiggle (not tilde)
` back quote (not back tick)
@ at (not at-sign)
^ caret (not circumflex)
& and or ampersand
- minus (in programming); dash (in the shell)
_ underbar (not underline)
| or-bar (not bar or vertical bar)
. dot (not period)
[] brackets
{} braces (not curly brackets)
<> less-than greater-than (not angle brackets)

But maybe that's just my California accent.

zimv20
Jun 1, 2003, 11:20 PM
Originally posted by Doctor Q


| or-bar (not bar or vertical bar)



many of those terms i also use, but that one is definitely a pipe!

mmmm... unix....

Doctor Q
Jun 1, 2003, 11:58 PM
You are right. I say "pipe" when I used | as a pipe. I say "or bar" when it's in a shell script or C program where it really is ORing. So put that in your OR-BAR and smoke it.

mmmdreg
Jun 2, 2003, 04:53 AM
I don't know how much you know, but you did type "cd " before you dragged the folder to the terminal right? and then you did press return right?

CrackedButter
Jun 2, 2003, 07:22 AM
@Doctor Q

I typed "echo $SHELL" and "echo $PATH" and i got this in return,

[John-JK-Morriss-Computer:~] johnjkmorris% echo $SHELL
/bin/tcsh
[John-JK-Morriss-Computer:~] johnjkmorris% echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin

@zimv20 & paulwhannel

I understand what you are saying about knowing the command line and such simple commands as "ls"and normally i wouldn't of tried to do this but in the readme file it simply stated i had to type alltogether 4 words. If it was that simple why wouldn't i try to do it?

In any case, now that it isn't working i'm happy to learn more about the command line, i'll have to anyway once i get more involved with Java development and for my own curiosity.

@mmmdreg

Yes i did

altivec 2003
Jun 2, 2003, 08:36 AM
Originally posted by maradong
dude, when using sudo, the second command is executed with normal user rights.
use :
su [enter]
enter the password , and do everything in the root mode.
to logoff from root mode just press ctrl-d
Yeah, i was wondering what the heck he meant when he said "sudo su".... strange:rolleyes: . Just so you know, you can also get out of root mode by typing exit.

Doctor Q
Jun 2, 2003, 10:26 AM
CrackedButter, your SHELL and PATH look fine. The make command would normally be found in the /usr/bin directory, which is indeed in your path, and you are using the normal tcsh shell.

Mini-lesson for those who don't already know these details: SHELL and PATH are "environment variables" that store settings for your session. You can type env to see the whole list of 'em. The value of PATH is a list of directories (folders), separated by colons, in your case /bin and /sbin and /usr/bin and /usr/sbin. When you type a command (e.g., "make"), the shell looks in each of those directories for the command (e.g., /bin/make, /sbin/make, /usr/bin/make, /usr/sbin/make) and executes the first one it finds. Certain commands (like "which") are actually built into the shell so they are always found. If a command isn't built into the shell and the shell doesn't find it in one of your PATH directories, you get "command not found".

I didn't ask whether your "which make" command produced this:

which: command not found

or this:

make: command not found

but I assume it is the latter.

All these clues fit the explanation that you have not yet installed the developer tools. What's the status of that?

CrackedButter
Jun 2, 2003, 03:11 PM
I installed the Dev tools when i said i would!

szark
Jun 2, 2003, 03:49 PM
Originally posted by Doctor Q
All these clues fit the explanation that you have not yet installed the developer tools. What's the status of that?

Actually, CrackedButter, you might not have the BSD subsystem installed.

You can find installation instructions here (http://developer.apple.com/techpubs/macosx/Darwin/GettingStarted/PortingUNIX/compiling/chapter_3_section_3.html).

CrackedButter
Jun 2, 2003, 05:32 PM
Its there the BSD.pkg file is there.

Anywho, since my ISP is terminating my account i doubt i will be back until a month from now until i register a new account with another ISP.

I get disconnected in either 30 mins or 24 hrs and 30 mins.

Something to play with until July 2nd.

zimv20
Jun 2, 2003, 06:23 PM
Originally posted by CrackedButter

Anywho, since my ISP is terminating my account i doubt i will be back until a month from now until i register a new account with another ISP.


this is getting more and more strange. are you from space?

Doctor Q
Jun 2, 2003, 08:14 PM
CrackedButter, if you are still there:

Maybe the Developer Tools failed to install properly, or maybe they installed OK but in a nonstandard location, or maybe there's some other explanation I'm not thinking of. So let's keep experimenting. To see if you have the make command where it usually resides, copy and paste this command into your shell and let's see what it reports:

ls -l /usr/bin/*make

The expected output is something like this:

-rwxr-xr-x 2 root wheel 234621 Jul 14 2002 /usr/bin/automake
-r-xr-xr-x 1 root wheel 119636 Dec 22 17:47 /usr/bin/bsdmake
-rwxr-xr-x 1 root wheel 152220 Dec 22 17:47 /usr/bin/gnumake
lrwxr-xr-x 1 root wheel 7 May 8 21:15 /usr/bin/make -> gnumake

maradong
Jun 3, 2003, 04:42 AM
Originally posted by altivec 2003
Yeah, i was wondering what the heck he meant when he said "sudo su".... strange:rolleyes: . Just so you know, you can also get out of root mode by typing exit.
true, but doing so some 20 times a day made me become lazzy and use more shortcuts than ever :D

Chimaera
Jun 3, 2003, 04:56 AM
Originally posted by zimv20
this is getting more and more strange. are you from space?

Nah, I'll bet he's a Tiscali user...

http://www.theregister.co.uk/content/6/30986.html

Nermal
Jun 3, 2003, 05:00 AM
Originally posted by Chimaera
Nah, I'll bet he's a Tiscali user...

http://www.theregister.co.uk/content/6/30986.html

Yeah but it shouldn't take a month to get a new ISP account!

maradong
Jun 3, 2003, 05:01 AM
Originally posted by Chimaera
Nah, I'll bet he's a Tiscali user...

http://www.theregister.co.uk/content/6/30986.html
now that - is real fun. in someway comparable to out p&t.
they make pub with flatrate, and internet withoud limits, and than suddenly you get a 10 gig traffic limit. it s rediculous.:mad:

CrackedButter
Jun 3, 2003, 06:31 AM
I was from Tiscali actually, its tonight i am getting cut off.

They cut me off but i was getting cut off anyway every 2 hours which i thought was the means of letting everyone share the connection. I'm signing up for Demon now and its an £10 a month for what i pay and i've made sure it's unlimited access, so with this at the moment i CAN stay online 24/7.

I will be getting broadband on the 18th of this month so i am waiting till then, no point in signing up for another dial up account then having to chang it again.

Anyway it takes 15 days for the broadband process to finish so i estimate its July 2nd when i come back.

maradong
Jun 3, 2003, 06:37 AM
Originally posted by CrackedButter

Anyway it takes 15 days for the broadband process to finish so i estimate its July 2nd when i come back.
i hope you don t forget us till then :D
( of course we will still be here . at least i hope.. you never know when your car might crash ):eek:

maradong
Jun 3, 2003, 06:38 AM
hm, i just felt like telling you, that it is time to upload an avatar :D