I stupidly deleted libc++ from my Mac (Mojave 10.14 on a 2015 MacBook Air). I had several versions and wanted to just use the newest... but now nothing works. The kernel panicked and for a while, it would panic/shutdown/boot/panic again without any interaction.
Now it doesn't even get to the panic screen! it just makes the startup sound over and over again -- even with the screen down or after pressing the power button repeatedly.
How can I get an OS installed again? Preferably macOS. All my important files were backed up so that's no issue. I don't have access to another computer, but I do have a flash drive with Ubuntu sitting around...or I could try to get to another computer to make an OS if necessary.
edit: I held down the power button for a while and now it is no longer trying to start over and over again.