You don't need sudo to work with brew read here.
The main problem is your own permission on /usr/local folder to execute these actions.Try this (make sure that you login as administrator role):
sudo chmod go+w /usr/local
And thenThen try again:
brew unlink ossp-uuid && brew link ossp_uuidossp-uuid
And finaland:
brew install postgresql