Permissions error

This is more server config question than WordPress.

Make sure the www-data group has write permissions in the directory you’re running WordPress from. Assuming it’s in /var/www/ then sudo chmod -R g+rwxs /var/www/ should do the trick.