Flex: Cannot install symfony/flex

Created on 8 Jun 2019  路  11Comments  路  Source: symfony/flex

This may be related to #510 but getting a different output.

I'm getting silent failures when attempting to either composer update within a project with symfony/flex as a dependency, or composer require symfony/flex in a new project. Myself and a colleague have replicated the same failure using;

mkdir foo && cd foo && composer require symfony/flex

The verbose output always silently fails at the same point - when downloading versions.json;

Installs: symfony/flex:v1.2.6
  - Installing symfony/flex (v1.2.6): Reading /Users/me/.composer/cache/files/symfony/flex/17b622276922e6347ea129acd6238ae1c41d96b6.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  '/Users/me/projects/foo/vendor/symfony/flex/a8f22883b46d1dc37b020f85641e33cd' -d '/Users/me/projects/foo/vendor/composer/335258e9'
Loading plugin Symfony\Flex\Flex
Downloading https://flex.symfony.com/versions.json

I've also tried tying to previous versions and clearing the cache but the outcome is still the same.

Most helpful comment

Got segfault with the latest curl version (7.65.1)
No issue when downgrading curl to 7.64.1 or recompiling with Apple's version

Simple fix:
Edit the formula with brew edit php
remove depends_on "curl-openssl"
change --with-curl=#{Formula["curl-openssl"].opt_prefix} to --with-curl#{headers_path}
and recompile with brew reinstall --build-from-source php

All 11 comments

Same problem here.

This seems to be resolved for me, presumably the versions file was updated? May be worth retrying @rodrigonull

@IckleChris I found out that was a proxy problem here.

Its working now.

This appears to be happening for me again, the only workaround I can find is to install/update using --no-plugins

Any details? This is barely actionable for now. Have you curl enabled? openssl? a company HTTP proxy?
Please debug and report back :)

I see you are on macos, i have the same issue on mojave with any version of php from brew (7.1, 7.2, 7.3).
Segmentation fault after Downloading https://flex.symfony.com/versions.json

Segfault are on PHP. curl enabled? better if disabled? others guess?

Got segfault with the latest curl version (7.65.1)
No issue when downgrading curl to 7.64.1 or recompiling with Apple's version

Simple fix:
Edit the formula with brew edit php
remove depends_on "curl-openssl"
change --with-curl=#{Formula["curl-openssl"].opt_prefix} to --with-curl#{headers_path}
and recompile with brew reinstall --build-from-source php

@aguillot I am also having seg faults but I have an earlier curl version installed

curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1

issue (on a fresh symfony 4.3 project):

composer install  
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 27 installs, 0 updates, 0 removals
  - Installing symfony/flex (v1.2.7): Loading from cache
[1]    3206 segmentation fault  composer install

composer and php versions:

composer -V && php -v  
Composer version 1.8.6 2019-06-11 15:03:05
PHP 7.3.6 (cli) (built: Jun 17 2019 08:40:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.6, Copyright (c) 1998-2018 Zend Technologies

@itsjavi brew's curl isn't on PATH, but here /usr/local/opt/curl-openssl/bin/curl
php have curl support compiled in, you should check with phpinfo or php -i | grep cURL

This is a bug from curl, already fixed upstream
Homebrew/homebrew-core#40812

Great, thanks for digging! I'm closing then.

Was this page helpful?
0 / 5 - 0 ratings