You are getting access denied because of the missing libraries. Default for everything in security is to deny. Can't find the library? Deny!
If you can do it, seems to me your best choice at this time is to copy the contents of /local to /lib. That will give you a LOT of duplication, but you'll have your system back under control, and you can worry later about how to clean up the duplicated mess.
This is where a current backup of the system partition comes in real handy.