Errors when installing plugins

Every time I try to install a plugin, the install button disappears, then it changes to error, and it doesn't install. Any thoughts how I can fix this?