PHP Laravel - Do not run Composer as root/super user! - Solved
This post is focused on Do not run Composer as root/super user! See https://getcomposer.org/root for details. you will learn do not run composer as root/super user laravel. if you want to see example of do not run composer as root/super user then you are a right place. you can understand a concept of do not run composer as root/super user ubuntu.
Few days ago i bought new digitalocean server and installed php, mysql, composer everything, but when i run composer command it says "Do not run Composer as root/super user! See https://getcomposer.org/root for details". you can see as bellow screenshot. this is warning but i want to remove it. i simply found solution to give permission to composer and it works.
So, let' see bellow solution and it will works:
Issue:
Solution:
you need to simply allow permission to super user for composer command.
export COMPOSER_ALLOW_SUPERUSER=1; composer show;
Then you can run composer and it works:
composer
i hope it can help you...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Install Composer in Ubuntu Server?
- Laravel Two Factor Authentication using Email Tutorial
- Laravel 8 Two Factor Authentication with SMS
- How to Get Today Created Records in Laravel?
- Laravel Eloquent whereRelation() Condition Example
- How to Remove Composer Package in Laravel?
- How to Upgrade PHP Version from 7.4 to 8 in Ubuntu?
- Laravel Seeder from CSV File Example
- How to Install Composer using Command Line in Ubuntu?
- How to Uninstall a Composer Package in Laravel?