See https://forum.posit.co/t/error-for-installing-packages/39169 . Maybe reading that will give you some ideas.