When I upgrade the wordpress, it shows the error
This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
So I reset all the permission for the files:
cd /var/www/wordpress sudo find . -type f -exec chmod 664 {} + sudo find . -type d -exec chmod 775 {} +
And try the upgrade again, it works.