Easy. Mount the filesystem under your usb linux. Then, download and replace those files. And plave them where they need to be. If there are links pointing to those missing libraries, they may have the correct version numbers.
Getting the right version numbers would be the only trick. There are a bunch of ways if figuring out the right versions... tje LLM may be able to help!!!
Next time, don't type commands, especially commands running as root (sudo) without understanding the command. Since you probably know what rm does, you should have done a search on what is this file I'm about to delete?
And if I'm deleting files like this, I'll usually just do mv file ~/backup/ instead of deleting them, so that I can easily pop them back if this kind of disaster happens!