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

codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime <path-to-binary>
Answer from weberc2 on Stack Overflow
Discussions

Lots of Killed: 9 compilation erro… | Apple Developer Forums
Everything was just fine, I take a week off, and then when I go back I can't compile because everytime Xcode tries to run a script phase it fails with the message "Killed 9". it's not an Xcode issue though as running the same commands in terminal have the same result. More on developer.apple.com
🌐 developer.apple.com
Error KILLED 9 SOLVED
Nice guide with clear instructions, however, you are overcomplicating the entire process. Some people don’t realize that all you need is Sliver 5.5, from appletech752.com/downloads.html, and you can literally bypass in 4 clicks on the iPad 4, it’s that simple. Sliver does everything for you, and includes the killed9 fix bundled in the application. No homebrew, libi, or command knowledge required! All you need is MacOS high sierra or mojave, and to SUDO CHMOD the Resources folder (as instructed in the readme file included with Sliver) Then just connect your iPad 4 in DFU mode immediately after a fresh restore, run the exploit, click one button to load the ramdisk, click a few more buttons, and boom it’s done! It’s that easy! There are 2 ramdisks, STD and ALT, so if the standard doesn’t work, just reboot, re-enter dfu when you see the Apple logo, rerun the exploit, and use the alternate. You won’t have any issues! Maybe some people will find your guide helpful if they like experimenting with the manual commands method, but I bet it takes 10 times longer than just using Sliver 5.5 on HS or Mojave. More on reddit.com
🌐 r/setupapp
2
1
February 17, 2021
macos - Running env bash on Mac Produces a Killed 9 Error - Stack Overflow
Whenever I run env bash on a shell or try to run a script that has env bash as its shebang, env always fails with a killed: 9 error. Does anyone know how to fix this? Running env on other interpret... More on stackoverflow.com
🌐 stackoverflow.com
Nix aborts with "Killed: 9" when I run commands with `nix-build` or `nix-shell`
After a successful install on Mac OS (High Sierra 10.13.6): https://gist.github.com/gamb/4ff732610f1c2c523dd8ca0cfd359628#file-install-result Any command aborts with Killed: 9. Example: bash-3.2$ n... More on github.com
🌐 github.com
3
January 26, 2019
Top answer
1 of 4
58

The kill command will send a defined signal to a process with a given identity (PID):

kill -<signal> <pid>

Of course we can only kill processes we own, whereas root can kill all processes. See Wikipedia for a nice summary of computing signals.

Signals kill can send are listed in the manpage. The signal can be represented by name or by number. If no signal is given the default signal 15 resp. TERM is used.

All three commands below are therefore identical:

kill -9 1234
kill -KILL 1234
kill -SIGKILL 1234

The difference between SIGTERM and SIGKILL is the way an application may act on the signal:

  • TERM: an application will be able to terminate, i.e. properly run a shutdown routine.
  • KILL: the applications is stopped and killed immediately (which could lead to data loss or raising apport to report a presumed crash in some cases).
2 of 4
38

The Ubuntu man page for kill explains the purpose of the -9 switch (admittedly in a rather choppy fashion):

Name     Num   Action    Description
KILL       9   exit      cannot be blocked

Here's what another man page says.

The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent. The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught.


Therefore, using the -9 switch ensures that the process is effectively killed. Even though a frozen or unresponsive process may not respond to a simple TERM signal, it will die when sent a KILL signal.

🌐
Apple Developer
developer.apple.com › forums › thread › 701242
Lots of Killed: 9 compilation erro… | Apple Developer Forums
I've had about 6 or 7 different random failures in different places, but they all say Killed: 9 Command PhaseScriptExecution failed with a nonzero exit code.
🌐
Reddit
reddit.com › r/setupapp › error killed 9 solved
r/setupapp on Reddit: Error KILLED 9 SOLVED
February 17, 2021 -

First I would just like to apologize I'm Brazilian and it may be that maybe my translation will get a little confusing, but this tutorial is for those who had the same problem as me at the time of bypass doe on iPad4 First of all I would recommend you update everything,

homebrew/libimobiledevice:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

Logo next: brew install libimobiledevice

Moving on to unlock, after the whole out-of-date process, we go through the following command: ./irecovery -f happen where several errors, among them what most people go through: KILLED: 9.

I bycame this error with the following command on my terminal:

STEP 1: brew install ldid

STEP 2: brew install make automake autoconf libtool pkg-config gcc

STEP 3:

git clone https://github.com/libimobiledevice/libirecovery.git

cd libirecovery

git submodule init && git submodule update

./autogen.sh

make

sudo make install

STEP 4: Test the command on your terminal: irecovery

If after you run it appears a menu of options means that your command worked!!

Only thing you should do now is replace the entire ./irecovery -f command with just irecovery -f

The ./irecovery2 -s command will function normally without having to be changed

Credits: AppleTech 752: here

Post I followed on reddit: post

homebrew: homebrew

donate Paypal: marcovoceali@gmail.com

Find elsewhere
🌐
Server Fault
serverfault.com › questions › 932312 › kill-9-throws-a-warning-when-its-run-from-a-script
linux - "kill -9 ..." throws a warning when it's run from a script - Server Fault
September 24, 2018 - pkill does send the specified signal to each matching process, as per man pkill ... Another equivalent option to this is simply killall -9 my_app, presuming all instances of my_app want to be killed.
🌐
Codemia
codemia.io › home › knowledge hub › what is killed9 and how to fix in macos terminal?
Codemia | Master System Design Interviews Through Active Practice
September 23, 2025 - Killed: 9 in macOS Terminal means the process received signal 9, which is SIGKILL. That signal stops a process immediately, without letting it clean up or print a friendly error.
🌐
YouTube
youtube.com › watch
Fixing the Killed: 9 Error When Running Env Bash on Mac - YouTube
Discover the solution to the frustrating `Killed: 9` error that occurs when running env bash on a Mac, including insights into custom installations and their...
Published   April 1, 2025
Views   1
🌐
GitHub
github.com › NixOS › nix › issues › 2655
Nix aborts with "Killed: 9" when I run commands with `nix-build` or `nix-shell` · Issue #2655 · NixOS/nix
January 26, 2019 - Any command aborts with Killed: 9. Example: bash-3.2$ nix-shell -p python these paths will be fetched (153.01 MiB download, 755.45 MiB unpacked): /nix/store/0b93wc2nw1bwza844xabdzq8rlmwb2af-libc++-5.0.2 /nix/store/0cx1dwnxhsbsm3y6q8k7r4lknwb71z8d-coreutils-8.30 /nix/store/1056l5hdg18ci2k70cicgwnvab4ginfp-libxml2-2.9.9 […] /nix/store/yk7sn5gwvw09hp8fs20c35yjji65vj7r-bash-interactive-4.4-p23-doc /nix/store/zk205w9w6fd77mv80iydcnp7c8s1him6-Libsystem-osx-10.11.6 copying path '/nix/store/yk7sn5gwvw09hp8fs20c35yjji65vj7r-bash-interactive-4.4-p23-doc' from 'https://cache.nixos.org'...
Author   NixOS
🌐
Reddit
reddit.com › r › jailbreak › comments › 6gkdpu › question_why_is_sbalert_printing_killed_9_when
r/jailbreak - [Question] Why is "sbalert" printing "Killed: 9" when ran? Or bash-notification pushing alternative
June 12, 2017 -

I recently jailbroke my phone and am pretty excited about it. One of the things I tried doing was being able to send push notifications from the terminal in plain bash. So, I need help with either,

  1. Finding a way to get sbalert to work so that I can push notifications or,

  2. Find another way to send notification from my iphone's terminal

🌐
Quora
quora.com › What-does-kill-9-mean-in-bash
What does “kill -9 $$” mean in bash? - Quora
Answer (1 of 4): It tells the shell to force-kill itself. More precisely, it sends SIGKILL (signal 9) to its own PID which is fetched with $$. This is useful for example, if you have (mis)typed commands that you don’t want added to your .bash_history or similar situations.
Top answer
1 of 6
39

It means that the application received a signal. Some signal could be handled by the applications, others, not. Signal 9 means that the application needs to be killed, it is not handled by the process, but by the Linux scheduler. The signal to terminate the process that is handled by the process is SIGTERM(15), but, if the process doesn't handle it property, then the process continues to live.

here are the major signals:

   Signal     Value     Action   Comment
   ──────────────────────────────────────────────────────────────────────
   SIGHUP        1       Term    Hangup detected on controlling terminal
                                 or death of controlling process
   SIGINT        2       Term    Interrupt from keyboard
   SIGQUIT       3       Core    Quit from keyboard
   SIGILL        4       Core    Illegal Instruction
   SIGABRT       6       Core    Abort signal from abort(3)
   SIGFPE        8       Core    Floating point exception
   SIGKILL       9       Term    Kill signal
   SIGSEGV      11       Core    Invalid memory reference
   SIGPIPE      13       Term    Broken pipe: write to pipe with no
                                 readers
   SIGALRM      14       Term    Timer signal from alarm(2)
   SIGTERM      15       Term    Termination signal
   SIGUSR1   30,10,16    Term    User-defined signal 1
   SIGUSR2   31,12,17    Term    User-defined signal 2
   SIGCHLD   20,17,18    Ign     Child stopped or terminated
   SIGCONT   19,18,25    Cont    Continue if stopped
   SIGSTOP   17,19,23    Stop    Stop process
   SIGTSTP   18,20,24    Stop    Stop typed at terminal
   SIGTTIN   21,21,26    Stop    Terminal input for background process
   SIGTTOU   22,22,27    Stop    Terminal output for background process
2 of 6
4

On UNIX systems the normal way to force terminate an app process is with

kill -9 PROCESS_ID

This sends the app the signal number nine which means: "you quit, NOW"

Generally unhandled exceptions will also cause the OS to terminate apps with this signal. Also killing an app via the "task switcher" does the same thing.

🌐
GitHub
github.com › hasura › graphql-engine › issues › 5462
cli exits with "Killed: 9" (MacOS 11 aka Big Sur) · Issue #5462 · hasura/graphql-engine
July 25, 2020 - I'm assuming this issue is specific to the MacOS 11 beta- running the hasura cli downloaded from GitHub immediately exits with "Killed: 9". If instead I clone the repo and build myself, the cli runs as normal.
Author   hasura
🌐
GitHub
github.com › benfred › py-spy › issues › 48
"Killed: 9"? · Issue #48 · benfred/py-spy
September 27, 2018 - 17:12 ~/code/optimizely/src/www $ pstree 98465 --- 98465 swilson /Users/swilson/code/optimizely/.virtualenv/www/test/bin/python /Users/swilson/code/optimizely/.virtualenv/www/test/bin/pytest --pdb services_test/client_tes [truncated] 17:13 ~/code/optimizely/src/www $ sudo py-spy --pid 98465 -f hottt Killed: 9
Author   benfred
🌐
Stack Overflow
stackoverflow.com › questions › 16441363 › shc-on-mac-showing-killed-9-error › 16441630
macos - shc on Mac showing 'Killed: 9' error - Stack Overflow
May 8, 2013 - I'm using shc on Mac OS, to generate stripped binary of bash scripts, for distribution. The issue is, when i execute the stripped binary (with .x ext) it shows the error killed: 9. Even when i mak...
🌐
GitHub
github.com › quarkusio › quarkus › issues › 13856
Native application gets Killed: 9 on macOS Big Sur with binutils on the path · Issue #13856 · quarkusio/quarkus
December 12, 2020 - sudo xattr -d -r com.apple.quarantine target/getting-started-1.0.0-SNAPSHOT-runner target/getting-started-1.0.0-SNAPSHOT-runner Killed: 9
Author   quarkusio