Skip to content

Instantly share code, notes, and snippets.

@irazasyed
Created April 18, 2022 01:24
Show Gist options
  • Save irazasyed/7086e8056ff4e8eb9bede5a3017d1de7 to your computer and use it in GitHub Desktop.
Save irazasyed/7086e8056ff4e8eb9bede5a3017d1de7 to your computer and use it in GitHub Desktop.
Composer - The process has been signaled with signal "6" - Solution

Composer - The process has been signaled with signal "6" - Solution

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.

Problem

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".

Debug

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

Solution

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.

@robrecord
Copy link

You are a legend. Thank you!

@mscherr-fastspot
Copy link

mscherr-fastspot commented Apr 19, 2022

This was my exact issue and solution; thank you so much.

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