It seems like is the problem with permissions. Try to add all of the necessary permissions for magento 2.
I recommend setting the permissions as follows:
All directories have 770 permissions.
770 permissions give full control (that is, read/write/execute) to the owner and to the group and no permissions to anyone else.
All files have 660 permissions.
660 permissions mean the owner and the group can read and write but other users have no permissions.
You should set as bellow recommended.
find . -type f -exec chmod 644 {} \; // 644 permission for files
find . -type d -exec chmod 755 {} \; // 755 permission for directory
find ./var -type d -exec chmod 777 {} \; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
sudo php bin/magento setup:static-content:deploy
got errorPHP Fatal error: Class 'Locale' not found in /var/www/magento2/lib/internal/Magento/Framework/Locale/Bundle/DataBundle.php on line 64