This question already has an answer here:

I'm trying to test my installation for Pickit 2 on my Mac for the first time and when I put in: pk2cmd -?v I get:

-bash: /usr/local/bin/pk2cmd: cannot execute binary file

How do I resolve this problem?

marked as duplicate by Kevin Panko, Matthew Williams, Excellll, Hennes, Raystafarian Nov 10 '14 at 13:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You have a binary executable file pk2cmd for a different architecture than Mac OS X. This system uses executables in the format Mach-O.

You can check the format of your executable using this command:

file /usr/local/bin/pk2cmd

See also this question: How to solve: -bash: : cannot execute binary file.

  • The software was released both for Linux and Mac OS X. See New PICkit 2 PK2CMD v1.20 for Linux & Mac OS X Released. You probably downloaded the binaries for Linux instead of Mac OS X. – pabouk Nov 6 '14 at 18:04
  • This is what i get after I put in "file /usr/local/bin/pk2cmd" = \/usr/local/bin/pk2cmd: data – Priince Abalogu Nov 7 '14 at 10:36
  • the link youve sent me leads me to the pickit2 product which I already have and runs perfectly in my uni computers(Microsoft). you saying that I have to buy a completely different Pickit to run on my MAC? – Priince Abalogu Nov 7 '14 at 10:44
  • @ChineduLloydAbalogu, there is also a different possibility - that the binary executable file content is corrupted. For example on nmap executable binary (extracted from the downloaded nmap-6.47.dmg) I get: file -k nmap nmap: Mach-O i386 executable. How did you install the package? Was not the file .dmg originally. Did not you just rename it? ------ To your second comment: I have no slightest idea how is Pickit 2 being sold and distributed. :) – pabouk Nov 7 '14 at 11:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.