Hordon
Hordon

Reputation: 713

What is Killed:9 and how to fix in macOS Terminal?

I have a simple Python code for a machine learning project. I have a relatively big database of spontaneous speech. I started to train my speech model. Since it's a huge database I let it work overnight. In the morning I woke up and saw a mysterious

Killed: 9

line in my Terminal. Nothing else. There is no other error message or something to work with. The code run well for about 6 hours which is 75% of the whole process so I really don't understand whats went wrong.

What is Killed:9 and how to fix it? It's very frustrating to lose hours of computing time...

I'm on macOS Mojave beta if it's matter. Thank you in advance!

Upvotes: 18

Views: 38648

Answers (5)

Dale
Dale

Reputation: 41

In my case, I found that my Golang version was v1.22.0 when running go install and running the binaries that it produced resulted in either Killed: 9 or would hang indefinitely. I never figured out why, but pointing to a more recent Golang v1.22.7 and re-running go install resolved the issue and the resulting binaries ran fine after the upgrade.

Upvotes: 3

xie Faiz
xie Faiz

Reputation: 59

I've got the same issue when I install mongodb, that is because it uses 'cp' something to your bin path

so enter your bin path:

cd /usr/local/bin
open .

then delete the new file

Upvotes: 0

weberc2
weberc2

Reputation: 7908

This fixed it for me; no idea how/why it works:

codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime <path-to-binary>

Upvotes: 20

bartosz.K
bartosz.K

Reputation: 22

Try to change the node version. In my case, that helps.

Upvotes: -2

Dhruv Saraswat
Dhruv Saraswat

Reputation: 1132

I faced this issue when I updated my Mac OS version from Catalina to Big Sur. I was trying to run a binary and facing the Killed: 9 issue.

I was able to resolve this issue by following the steps below (I referred to this Apple StackExchange post for these steps) :-

  1. Download UPX via Homebrew - brew install upx
  2. Then decompress the binary - upx -d /path/to/binary/file

Upvotes: -1

Related Questions