![]() |
Help! sudo is not found?
I opened up Terminal yesterday to compile the LAME MP3 encoder, and did a "sudo make install" to move it into /usr/local or whatever. LAME worked fine, and using iTunes+Lame, I imported a CD into iTunes.
Today, I typed "sudo ls" just for the heck of it (Don't ask why, I don't know) and this appeared: http://i15.tinypic.com/6tdcrjr.png It appears sudo is missing? Is that even possible? |
sudo isn't missing. The error is saying that you can't use sudo for the ls command for that user.
|
type
whereis sudo example: Code:
Last login: Mon Dec 17 15:22:36 on ttyp1 |
Quote:
|
ThreeDee, sudo is usually found in /usr/bin (I'm in Tiger right now, but I doubt that this changed in Leopard.) Please show us the results of
ls -l /usr/bin/sudo Probably the reason that your shell can't find sudo is that /usr/bin is not currently in your PATH. Please show us the results of echo $PATH Trevor |
I'm also running Tiger. Anyway, here's the output:
Code:
Last login: Mon Dec 17 18:19:33 on ttyp1 |
Code:
$ which sudoCode:
$ ls -la /usr/bin |
The which command is not going to find sudo, as it was already established in the original post that sudo was not found by the shell, and which does not look outside the PATH.
Quote:
locate /sudo Quote:
ls -la /usr/bin is a good one, as it may show us the scope of the problem. Trevor |
Another interesting command to run would be:
history | grep -i sudo |
I thought I recalled which also being able to tell you if the command had been aliased. Guess not. Oh well.
|
1 Attachment(s)
"locate /sudo" returns something fishy:
Code:
Last login: Mon Dec 17 18:59:30 on ttyp1 |
And the results of hayne's command:
Code:
Last login: Mon Dec 17 19:01:24 on ttyp1Near the end I'm guessing is all of the commands I'm entering to try and find what happened to sudo. You can see the typo I made on line 450. :) |
I was mostly hoping not to see that directory totally empty. Then again, seeing it empty would've been easier to explain . . .
Anything interesting in system.log? To clarify, was this the last successful use of sudo you invoked? (It's the last one before the ls command, and you mention that in your first post.) Code:
420 sudo make install |
Too bad you're not on Leopard--Time Machine would have been useful to bring sudo back.
There's no indication that any of the other things in your /usr/bin directory are actually sudo but renamed. None of the other files duplicates sudo's unusual permissions (-r-s--x--x), nor do any of the other files have the exact same size as sudo. As locate is not working for you, try using find. My elementary skills with the find command result in sudo find / -name "sudo" -print but someone else may be able to give you a better 'find'. I suspect that using Pacifist to reinstall your "BSD Subsystem" (or whatever it's called in Apple's Installer) may be your quickest method to getting sudo back. And I'm very curious why your installation of LAME would remove sudo, if that's what is currently thought. Trevor |
Quote:
|
what have you installed that would put /opt in your $PATH?
I thought really only distros based on redhat really used the /opt directory and it is definitely not a standard install of tiger. Standard install of 10.4 there is no /opt directory. Perhaps something like Fink may install that in your path for Linux executables installed? |
I normally try not to speculate, but something here smells like an installer script gone awry. :(
|
This is really odd. Anyway, my system log (just noticed it's almost over 200MB in size???) is filled up with thousands of lines of this, which I doubt has anything to do with sudo:
Code:
Dec 17 21:30:51 G4-Computer kernel[0]: USBF: 10113.734 AppleUSBOHCI[0x2d17000]::Found a transaction which hasn't moved in 5 seconds on bus 25, timing out!I do have DarwinPorts and Fink installed, so I guess one of them could have added the /opt? And trevor, you command won't work. I'm stuck in a catch-22. I'm going to need to use sudo in order to gain root access to 'find' sudo. Unless you want me to log in as root or something... I'll try reinstalling with Pacifist. |
Where did you get the LAME sources? What was your compile procedure?
|
Quote:
Trevor |
Quote:
|
I got the lame source directly from http://lame.sourceforge.net/
I compiled by doing "./configure" to run the config script, then "make" to compile, then "sudo make install" to install it. hayne, you are probably right about doing an Archive & Install. I'll do that instead when I get the chance. I'm a bit busy right now. |
Update: Did an Archive & Install, and sudo works fine now.
Before doing an A&A, I only had ~3GB free (bad for the system, I know). After reinstalling and upgrading to 10.4.11 again, I now have ~10GB free? I know all my user files are intact. Was there some 7GB of crap hiding out in the various hidden system folders? |
| All times are GMT -5. The time now is 10:13 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.