1

CRAFT CMS 4.5 has been released. I have updated to this version calmly. There are new updates 4.5.1, 4.5.2, 4.5.3. But when trying to update the system, it gives this error:

Ошибка: The command "'/opt/php82/bin/php' '/home/c/cf74574/fmedia.info/storage/runtime/composer.phar' 'update' 'craftcms/cms' '--with-all-dependencies' '--working-dir' '/home/c/cf74574/fmedia.info' '--no-scripts' '--no-ansi' '--no-interaction'" failed.

Exit Code: 1(General error)

Working directory: /home/c/cf74574/fmedia.info/public_html

Output:

Error Output:

In Factory.php line 697:

The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [...]

Вывод компоновщика: In Factory.php line 697:

The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [...]

Please help me to sort out the problem. What could be the reason?

1 Answer 1

1

I'm not sure if this is the same problem I had once, but it looks similar. If you are running the update as a terminal command, my hosting company (running cPanel) suggested I ran this line of code in the terminal straight after I logged in and before doing anything else to set the location of composer.

alias composer='ea-php81 /opt/cpanel/composer/bin/composer'

I'm not a sysadmin and only use the terminal when I have to, so this may not apply to your hosting setup. But it might give you a start in finding the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.