Can't open lib '/opt/homebrew/lib/libmsodbcsql.17.dylib' from M1 Mac ARM64

Problems like this would have taken M1 off my wishlist if I hadn't already thrown up my hands and gone to Ubuntu. It looks like you've been down most of the available rabbit holes. The only think that comes to mind is to replace the symlink with a copy to /opt/homebrew/lib, confirm it is readable and see if that fixes the problem.

(If I should wake up to find that Santa had put an M1 under my tree, I'd set up a virtual Ubuntu to run R.)