If you're on macOS and suddenly composer has started throwing this weird error and you're wondering where the problem is, well, here's the solution and how to debug.
Error when you run composer global update
or any other similar commands.
In Process.php line 441:
The process has been signaled with signal "6".
Start with composer -vvv
This should return the response in debug level of verbosity.
Go through the response and look for the errors, that's your hint to figure out the issue.
In my case, the failure was due to the svn
command (highlighted with the stars for ref).
Loading config file /Users/username/.composer/config.json
Loading config file /Users/username/.composer/auth.json
Reading /Users/username/.composer/composer.json
Loading config file /Users/username/.composer/config.json
Loading config file /Users/username/.composer/auth.json
Loading config file /Users/username/.composer/composer.json (/Users/username/.composer/composer.json)
Loading config file /Users/username/.composer/auth.json
Reading /Users/username/.composer/auth.json
Checked CA file /opt/homebrew/etc/ca-certificates/cert.pem: valid
Executing command (/Users/username/.composer): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/Users/username/.composer): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/Users/username/.composer): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/Users/username/.composer): hg branch
Executing command (/Users/username/.composer): fossil branch list
Executing command (/Users/username/.composer): fossil tag list
Executing command (/Users/username/.composer): svn info --xml
**Failed to initialize global composer: The process has been signaled with signal "6".**
Running 2.3.5 (2022-04-13 16:43:00) with PHP 8.1.5 on Darwin / 21.4.0
Reinstall svn:
brew reinstall svn
Try running:
svn info --xml
The expected response is:
<?xml version="1.0" encoding="UTF-8"?>
<info>
svn: E155007: '/Users/username' is not a working copy
This means it's working and you can retry running composer version in debug mode (composer -vvv
).
If however, it throws an error like the one below:
dyld[32418]: Symbol not found: _apr_crypto_block_cleanup
Referenced from: /opt/homebrew/Cellar/subversion/1.14.2/lib/libsvn_subr-1.0.dylib
Expected in: /usr/lib/libaprutil-1.0.dylib
[1] 32418 abort svn info --xml
Reinstall apr-util
:
brew reinstall apr-util
If during this process, brew suggests you to link Java extensions, then go ahead and do it.
If everything goes well, composer commands should start working fine again.
This was my exact issue and solution; thank you so much.