Skip to content

Instantly share code, notes, and snippets.

@tristanmorgan
Created February 20, 2020 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tristanmorgan/7de1d2e791ce99ac966935b0b8d61fdd to your computer and use it in GitHub Desktop.
Save tristanmorgan/7de1d2e791ce99ac966935b0b8d61fdd to your computer and use it in GitHub Desktop.
macOS signed binary "Killed: 9"

macOS signed binary "Killed: 9"

Not so much of a "file" but a story of finding out how to fix when you download something from the 'net and it won't run because of protextions in the system. Specifically I'm talking about macOS Catalina.

I download a file via Safari and I try to run it and I get some sorta error. solution was to:

xattr -d com.apple.quarantine ~/Downloads/some-binary

OK, so lets try use a cli tool like go-getter to download (and unzip) the file.

Killed: 9

Huh!? there is no quarantine attribute on it. and this was working for aaaaages.

codesign -dv /usr/local/bin/some-binary

All good. download another copy and check codesign... Runs fine!

diff ~/Downloads/some-binary /usr/local/bin/some-binary

Identical!

rm /usr/local/bin/some-binary
mv ~/Downloads/some-binary /usr/local/bin/some-binary

Works now!! Ummm... but how?

the next day

I ran my update script that grabs newer versions if available for a bunch of tools and:

Killed: 9

@#$#%%^^ What happend this time. Hmm, what happens if I delete the file then donwload the update.

Version number V1.Blah

OK. so its something to do with the file being replaced inplace.

Anyone have ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment