服务器中使用 composer 报提醒:Do not run Composer as root/super user
# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
82 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
设置环境变量
# 临时
export COMPOSER_ALLOW_SUPERUSER=1
# 永久
echo 'export COMPOSER_ALLOW_SUPERUSER=1' >> ~/.bashrc