How to fix "Killed: 9" error in mac os?

I've upgraded my OS to Sierra recently, in El Capitan I had some apps and they were working perfectly, but in Sierra they show me:

Killed: 9

I even execute them via sudo but they won't work.

Any idea?


Solution 1:

Close the terminal window you're getting those errors in and open a new one.

Solution 2:

If you replace a signed macOS binary by using cp instead of mv then macOS caches the signature, doesn't like the look of it because the file changed and kills your process when you try and start the new binary. Clearly, this is a bug in macOS. We had to update our install scripts to copy the file a different way.