PHP Laravel – do not run composer as root/super user! see https://getcomposer.org/root for details – Solved

PHP Laravel – Do not run Composer as root/super user! – Solved

do not run composer as root/super user! see https://getcomposer.org/root for details – Problem – composer root with creating laravel project – do not run Composer as root/super user – “Do not run Composer as root/super user!”

do not run composer as root/super user! see https://getcomposer.org/root for details

Issue:
Do not run Composer as root/super user! See https://getcomposer.org/root for details Installing laravel/laravel (v5.5.28) – Installing laravel/laravel (v5.5.28): Loading from cache Created project in /mnt/c/xampp/htdocs/laravel

composer create-project --ignore-platform-reqs --prefer-dist laravel/laravel pakainfo_v1

Solution:

The “Do not run Composer as root/super user!” is only a warning. You are trying to run it in /home/pakainfo_v1 but perhaps your laravel web project is in /var/www/html/pakainfo_v1 (depending on your OS as well as web server config)

you required to simply allow some permission to super user for composer command like bellow.

export COMPOSER_ALLOW_SUPERUSER=1; composer show;

Don’t miss : Mysql Connect To Remote Database

after that you can run or execute composer and it works fine:

run composer

composer

I hope you get an idea about do not run composer as root/super user!.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment