To be able to install plugins automatically, WordPress requires the web server user to be the owner of the directories wp-admin y wp-content, located where you have it installed. a little strange, because it is not satisfied with having group write permissions (p.e.chgrp -R www-data wp-admin wp-content; chmod -R g+w wp-admin wp-content), I can't even imagine why he wants to own wp-admin, If the plugins are in wp-content/plugins…  in any case, The following commands fix the problem on Ubuntu:

cd /usr/share/wordpress
sudo chown -R www-data wp-admin wp-content