Wordpress YIKES! If you encounter the It looks like you're running this as root error, you must perform the operation with root when using this command, as written in the description of the error.
If you still want to use it with root, you can use the command below.
wp core update --allow-root
If you want to use it with different user privileges, you can use the command below.
sudo -u USER -i -- wp core update --allow-root
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket