I got the same issue. I shifted my internet connection to mobile data from Wifi and it install the package successfully. I do not know the exact reason but it works for me. Using Mac M1.