Composer failing with Signal 9 - php

I'm puzzled about this Composer failure. Can anyone help? The only things I've seen about "signal 9" have to do with resource limitations, which I do not have. It looks like a require() is failing?
I have a new M1-based macbook air, running PHP 8.0.0 and have Composer (v2.0.8) installed, both using homebrew. I'm trying to create a new Cakephp project.
I have git installed and running.
When I run:
composer -vvv create-project --prefer-dist cakephp/app projectname
Composer fails with a Symfony runtime exception signal 9 - as below:
composer -vvv create-project --prefer-dist cakephp/app projectname
Reading ./composer.json (/Users/xxxxxxx/Dropbox/Development/git/sites/composer.json)
Loading config file ./composer.json (/Users/xxxxxxx/Dropbox/Development/git/sites/composer.json)
Checked CA file /opt/homebrew/etc/openssl#1.1/cert.pem: valid
Executing command (/Users/xxxxxx/Dropbox/Development/git/sites): git branch -a --no-color --no-abbrev -v
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signaled with signal "9".
Exception trace:
() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/vendor/symfony/process/Process.php:366
Symfony\Component\Process\Process->wait() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/vendor/symfony/process/Process.php:198
Symfony\Component\Process\Process->run() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Util/ProcessExecutor.php:125
Composer\Util\ProcessExecutor->doExecute() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Util/ProcessExecutor.php:65
Composer\Util\ProcessExecutor->execute() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Package/Version/VersionGuesser.php:122
Composer\Package\Version\VersionGuesser->guessGitVersion() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Package/Version/VersionGuesser.php:71
Composer\Package\Version\VersionGuesser->guessVersion() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Package/Loader/RootPackageLoader.php:81
Composer\Package\Loader\RootPackageLoader->load() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Factory.php:368
Composer\Factory->createComposer() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Factory.php:595
Composer\Factory::create() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:409
Composer\Console\Application->getComposer() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:527
Composer\Console\Application->getPluginCommands() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:187
Composer\Console\Application->doRun() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:122
Composer\Console\Application->run() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/bin/composer:63
require() at /opt/homebrew/Cellar/composer/2.0.8/bin/composer:24

This is resolved. I used Homebrew to reinstall git. Once I did that, composer worked. What tipped me off was running "brew update" and getting:
Error: Failure while executing; git config --replace-all homebrew.analyticsmessage true was terminated by uncaught signal KILL.
I figured git was broken somehow (Odd, since I've been using it.) So I reinstalled it.

Related

Generates error after running npm run dev

After running all following command successfully
composer create-project laravel/laravel project_name
composer require laravel/breeze --dev
php artisan breeze:install react
npm install
When I am running this command
npm run dev
then getting
ERROR in /js/app
Module not found: Error: Can't resolve '...\project_name\resources\js\app.js' in '....\project_name'
webpack compiled with 1 error
Then how do I solve this error?
Note: I am just using https://bootcamp.laravel.com/inertia/installation instruction to isntall laravel project with react.

Installing PyroCMS error when installing in xampp (windows)

I am getting below error after downloading the package:
**In MigrateCommand.php line 58:
Too few arguments to function Illuminate\Database\Console\Migrations\MigrateCommand::__construct(), 1 passed in C:\xampp\htdocs\pyro\vendor\anomaly\streams-platform\src\Database\Migration\MigrationServiceProvider.php on line 88 and exactly 2 expected**
Above error is generated when entering the command
php artisan install
I had the Same issue! It looks that composer.lock file and your php version are not compatible.
I deleted the composer.lock file that comes with the repo, and the vendor project, after run composer install and then php artisan install.
I hope it works for you!

Not able to install composer in laravel project

I am new in Php and start working on laravel based project but facing one issue when installing composer on project level (I am using Phpstrom Ide).
composer install --no-interaction --ansi  Loading composer
repositories with package information  Installing dependencies
(including require-dev) from lock file  Nothing to install or update
 Generating optimized autoload files
 > Illuminate\Foundation\ComposerScripts::postInstall
 > php artisan optimize  Script php artisan optimize handling the post-install-cmd event returned with error code 1  Failed to install
packages for ./composer.json.
Process :-
Install composer and wamp server
Hit this command in order to create laravel project
composer create-project laravel/laravel --prefer-dist
and project is created with this error and no vendor folder is created
Installing laravel/laravel (v5.4.30)
- Installing laravel/laravel (v5.4.30): Downloading (100%) Created project in C:\wamp64\www\laravel
php -r "file_exists('.env') || copy('.env.example', '.env');" Script php -r "file_exists('.env') || copy('.env.example', '.env');" handling
th e post-root-package-install event returned with error code 1
I hit the composer command for Install and get first issue in this post
Composer -v
PHP temp directory (D:\mysql\temp) does not exist or is not writable
to Composer . Set sys_temp_dir in your php.ini
Composer version 1.6.5 2018-05-04 11:44:59
composer -version
PHP temp directory (D:\mysql\temp) does not exist or is not writable
to Composer . Set sys_temp_dir in your php.ini
[Symfony\Component\Console\Exception\RuntimeException] The "-e"
option does not exist.
Exception trace: () at
phar://C:/composer/composer.phar/vendor/symfony/console/Input/ArgvInput.p
hp:124
Symfony\Component\Console\Input\ArgvInput->parseShortOptionSet() at
phar://C:/c
omposer/composer.phar/vendor/symfony/console/Input/ArgvInput.php:105
Symfony\Component\Console\Input\ArgvInput->parseShortOption() at
phar://C:/comp
oser/composer.phar/vendor/symfony/console/Input/ArgvInput.php:84
Symfony\Component\Console\Input\ArgvInput->parse() at
phar://C:/composer/compos
er.phar/vendor/symfony/console/Input/Input.php:54
Symfony\Component\Console\Input\Input->bind() at
phar://C:/composer/composer.ph
ar/vendor/symfony/console/Command/Command.php:200
Symfony\Component\Console\Command\Command->run() at
phar://C:/composer/composer
.phar/vendor/symfony/console/Application.php:843
Symfony\Component\Console\Application->doRunCommand() at
phar://C:/composer/com
poser.phar/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at
phar://C:/composer/composer.p
har/src/Composer/Console/Application.php:251
Composer\Console\Application->doRun() at
phar://C:/composer/composer.phar/vendo
r/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at
phar://C:/composer/composer.pha
r/src/Composer/Console/Application.php:100
Composer\Console\Application->run() at
phar://C:/composer/composer.phar/bin/com poser:59 require() at
C:\composer\composer.phar:24
list [--xml] [--raw] [--format FORMAT] [--] []
[Symfony\Component\Console\Exception\RuntimeException] The "-e" option does not exist.
Above error comes because of options shortcuts… here composer - version means composer -v… and which is not working in your case. That's the reason behind the last error stack.
Refer this link to see GitHub issue.
the -e option does not exist
instead of running composer -version try to run
composer --version
and see it shows composer version or not...if not then the composer is not installed properly.
Then run
laravel --version
if you don't see version there. install composer and laravel again. Below link will be helpful for step by step installation.
laravel new doesn't work
It seems that composer is not properly installed on your environment...
Follow the official documentation and try again to install your dependencies.
Let me know if this solution worked.
01.composer self-update --rollback
02.composer self-update --clean-backups

Capistrano deployment aborted because of Composer

I've an issue with my cap deployment when the command runs :
/usr/bin/env composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader
It takes few minutes before I receive this error message:
composer stdout: Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 954
composer stderr: Loading composer repositories with package information
The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
If i'm going to the current release of project on the server, and I remove vendor folder, then I execute "composer install", it works.
Locally, on my computer, mamp env, I execute this command with a memory limit :
php -dmemory_limit=2G /usr/local/bin/composer install
it works also.
The problem occurs only when I use capistrano deployment.
Any idea ?
For information :
I checked the server, it has 4Go Ram.
Swap is activated.
php memory limit is set -1.
Thanks,
I just upgraded my config with 6Go RAM. Composer install seems working ... but why does it need so much memory ?

Codeship CI returns unexplainable Composer error

Running a CI build on codeship.io returns into an unexplainable error. The last lines of the debug text is:
[..]
Clearing the cache for the dev environment with debug true
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets handling the post-install-cmd event terminated with an exception
[ErrorException]
Undefined property: Composer\Script\CommandEvent::$getIO
The codeship documentation doesn't say much about deploying/building a Symfony application. It seems like it is impossible to create the bootstrap.php.cache file.
EDIT:
I'm using Symfony 2.4.3-DEV, composer is unable to finish the post-install-cmd scripts, so it looks like composer has no i/o interface at Codeship. Adding composer self-update to the install script at Codeship does result in the same error.
The codeship configuration is:
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install dependencies through Composer
composer selfupdate
composer install --prefer-source --no-interaction --optimize-autoloader
Have you specified PHP in the Select your technology to prepopulate basic commands field ? What are your Setup Commands ?
Mine are :
phpenv local 5.5
composer install --prefer-source --no-interaction
php app/console assetic:dump --env=prod

Categories