Cannot execute binary file?

Joined
Feb 10, 2011
Messages
7
Reaction score
0
Points
1
Location
Scarborough, England
Hi

A section of script I have been working on was working fine yesterday and today has stopped working with out any changes being made. The two lines in question are nothing fancy:

Code:
pmset -a sleep 0 force
softwareupdate -i -a

When I run the script in terminal it returns
": command not founde 2:"
followed by a description of the usage of pmset and then
"software update: invalid option -- \r"
followed by the description on the usage of software update.

I then tried running the the two line seperatly by typing them directly into terminal and it returned
"/usr/sbin/softwareupdate: cannot execute binary file"
and
"/usr/bin/pmset: cannot execute binary file"

With my limited knowledge of macs I am now rather confused as why this is happening, any suggestions?

If it helps this is in OS X 10.5.8 and I ran echo $PATH and got
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Larkin
 
OP
Larkin
Joined
Feb 10, 2011
Messages
7
Reaction score
0
Points
1
Location
Scarborough, England
If no one has an straight answer fair play, but has anyone got any idea/suggestions where I should look for an answer or what to do to rule out potential problems and find the cause?

Larkin
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,765
Reaction score
2,106
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Do "file /usr/sbin/softwareupdate" and "file /usr/bin/pmset" and see what it says..I have the following values:
Code:
$ file /usr/sbin/softwareupdate 
/usr/sbin/softwareupdate: Mach-O universal binary with 3 architectures
/usr/sbin/softwareupdate (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/sbin/softwareupdate (for architecture i386):	Mach-O executable i386
/usr/sbin/softwareupdate (for architecture ppc7400):	Mach-O executable ppc

$ file /usr/bin/pmset 
/usr/bin/pmset: Mach-O universal binary with 3 architectures
/usr/bin/pmset (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/bin/pmset (for architecture i386):	Mach-O executable i386
/usr/bin/pmset (for architecture ppc7400):	Mach-O executable ppc

Regards
 
OP
Larkin
Joined
Feb 10, 2011
Messages
7
Reaction score
0
Points
1
Location
Scarborough, England
Hi

Entered as you suggested results are below:

Code:
$ file /usr/bin/pmset
/usr/bin/pmset: Mach-O universal with 2 architectures
/usr/bin/pmset (for architecture i386): Mach-O executable i386
/usr/bin/pmset (for architecture ppc7400):      Mach-O executable ppc

$ file /usr/sbin/softwareupdate
/usr/sbin/softwareupdate: Mach-O universal with 2 architectures
/usr/sbin/softwareupdate (for architecture i386): Mach-O executable i386
/usr/sbin/softwareupdate (for architecture ppc7400):      Mach-O executable ppc

As I'm back on the college site for the first time since my original post this is the first time I have used the mac in question since friday. 'softwareupdate' seems to be running fine again although 'pmset' is still crying every time I run it.

Larkin
 
OP
Larkin
Joined
Feb 10, 2011
Messages
7
Reaction score
0
Points
1
Location
Scarborough, England
Ok now its playing ball again, not complaining but thoroughly confused.

Cheers for trying to help Raz0rEdge.

Larkin
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top