Drupal-project: Error while creating project

Created on 28 Dec 2017  路  5Comments  路  Source: drupal-composer/drupal-project

Ubuntu 16.04
I fell like getting this to work is so much more trouble, then just installing Drupal. The guide/documentation seems to be missing several steps, or somethings are assumed (yet not stated) about your server build, and I'm not even talking about permissions (which was a Google adventure).

My issue, while trying to create the project:

  • Installed composer and configured globally mv composer.phar /usr/local/bin/composer

  • ran myuser:/var/www/html$ composer create-project drupal-composer/drupal-project:8.x-dev /var/www/html/mysite/ --stability dev --no-interaction

  • received errors for php unable to unzip/zip, so ran apt-get install php-xml

  • rm all the files in mysite folder and ran the create-project again.
  • now received errors below:
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/console 1.0.2 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.1.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.1.1 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.2.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.3.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.3.1 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - alchemy/zippy 0.4.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - Installation request for drupal/console ^1.0.2 -> satisfiable by drupal/console[1.0.2, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.1].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/15-xml.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-dom.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mysqli.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-simplexml.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-wddx.ini
    - /etc/php/7.0/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.0/cli/conf.d/20-xsl.ini
    - /etc/php/7.0/cli/conf.d/20-zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
  • ran composer require alchemy/zippy
  • received errors below
Using version ^0.4.8 for alchemy/zippy
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 729817088) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Fatal error: Out of memory (allocated 729817088) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
myuser:/var/www/html/mysite$ mmap() failed: [12] Cannot allocate memory
-bash: syntax error near unexpected token `failed:'
myuser:/var/www/html/mysite$ composer require alchemy/zippymmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 729817088) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Fatal error: Out of memory (allocated 729817088) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
-bash: syntax error near unexpected token `('
myuser:/var/www/html/mysite$
myuser:/var/www/html/mysite$ mmap() failed: [12] Cannot allocate memory
-bash: syntax error near unexpected token `failed:'
myuser:/var/www/html/mysite$ PHP Fatal error:  Out of memory (allocated 729817088) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
-bash: syntax error near unexpected token `('
myuser:/var/www/html/mysite$
myuser:/var/www/html/mysite$ Fatal error: Out of memory (allocated 729817088) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
-bash: syntax error near unexpected token `('
myuser:/var/www/html/mysite$ myuser:/var/www/html/mysite$ mmap() failed: [12] Cannot allocate memory
-bash: syntax error near unexpected token `('

Most helpful comment

Installed mbstring and then had memory errors, created a swap file and then it all installed. Seriously, why is there not a list or requirements and prerequisites?

All 5 comments

alchemy/zippy 0.4.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

Try to install mbstring via apt first.

Seems like I need a dependency manager to get this dependency protect running...is there a list off everything I need, so I am not doing this one for are a time?

Installed mbstring and then had memory errors, created a swap file and then it all installed. Seriously, why is there not a list or requirements and prerequisites?

With the current version of Composer (1.5), assuming you're on a standard Linux/macOS machine, you should be able to run something like (composer show -t --no-ansi && composer show -s -t --no-ansi) | grep -o "\-\-\(ext-.\+\|php \).\+" | sort | uniq | cut -d- -f3-.

With Composer 1.6 (currently in its release candidate phase), there's a composer check-platform-reqs command.

Related: https://github.com/composer/composer/issues/4658

I have used the https://github.com/BurdaMagazinOrg/thunder-project/issues/20#issuecomment-382775403 solution, this helped for the php 7.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amitaibu picture amitaibu  路  6Comments

ao2 picture ao2  路  3Comments

waseem312 picture waseem312  路  3Comments

boobaa picture boobaa  路  7Comments

9034725985 picture 9034725985  路  6Comments