Did you start the installation with “sudo” as per installation documentation?
This sounds like a possible permission problem. Do you know how to check the permissions of the /temp directory? If yes, post them. If not, let me know
Or maybe this will help, either the post about the permission thing or maybe the curl installation as per the last post: