Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.5]: Unable to install updates on local MAMP installation #13590

Closed
cloudgrayau opened this issue Aug 23, 2023 · 2 comments
Closed

[4.5]: Unable to install updates on local MAMP installation #13590

cloudgrayau opened this issue Aug 23, 2023 · 2 comments

Comments

@cloudgrayau
Copy link

cloudgrayau commented Aug 23, 2023

What happened?

After updating to Craft 4.5 and attempting to install further updates via the Craft CMS UI, I receive the following:

Composer was unable to install the updates.

Error: The command "'/Applications/MAMP/bin/php/php8.2.0/bin/php' '/Users/cloudgray/Sites/cloudgray/storage/runtime/composer.phar' 'update' 'craftcms/ckeditor' '--with-all-dependencies' '--working-dir' '/Users/cloudgray/Sites/cloudgray' '--no-scripts' '--no-ansi' '--no-interaction'" failed.

Exit Code: 1(General error)

Working directory: /Users/cloudgray/Sites/cloudgray/web

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] [--] [<packages>...]

Craft CMS version

4.5

PHP version

8.2

Operating system and version

MAC

Database type and version

MySQL

Image driver and version

No response

Installed plugins and versions

@cloudgrayau cloudgrayau changed the title [4.5]: Unable to install updates on local MAMP installation [4.x]: Unable to install updates on local MAMP installation Aug 23, 2023
@cloudgrayau cloudgrayau changed the title [4.x]: Unable to install updates on local MAMP installation [4.5]: Unable to install updates on local MAMP installation Aug 23, 2023
@croxton
Copy link

croxton commented Aug 23, 2023

You could try adding this to the.zshrc or .bash_profile file in your user directory (depending which profile you're using by default in your terminal):

export COMPOSER_HOME="$HOME/.composer";

Make sure to start a new terminal session after making that change, or run source ~/.zshrc (or source ~/.bash_profile) to load the updated profile.

@brandonkelly
Copy link
Member

Thanks for reporting that. Craft 3.9.1 and 4.5.1 are out now with a fix.

If you’re having this issue, you will need to do one of the following to update to 3.9.1/4.5.1:

I verified the second option will work. Here’s my /Applications/MAMP/Library/bin/envvars file:

COMPOSER_HOME="/path/to/project/storage/runtime/composer"
export COMPOSER_HOME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants