Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Terminus build:project:create fails with exit code 2 #155

Open
christopherjones2621 opened this issue Jul 9, 2018 · 3 comments
Open

Terminus build:project:create fails with exit code 2 #155

christopherjones2621 opened this issue Jul 9, 2018 · 3 comments

Comments

@christopherjones2621
Copy link

Good Morning,

Trying to build a new site on Pantheon but having issues with multiple Terminus Errors. I've troubleshooted and added Php curl and Php xml, but can't seem to find the source of the error below. I'm using a VM with Ubuntu, thanks for the help

c@c-VirtualBox:~$ terminus build:project:create d8 inthmmgt

Enter the password you would like to use to log in to your test site,
or leave empty for a random password::

[notice] Create GitHub project inthmmgt from pantheon-systems/example-drops-8-composer
[notice] Call GitHub API: user
[notice] Creating project and resolving dependencies.
[notice] Running composer create-project --working-dir=/tmp/local-siteMxuWmx pantheon-systems/example-drops-8-composer inthmmgt -n
Installing pantheon-systems/example-drops-8-composer (1.3.9)

  • Installing pantheon-systems/example-drops-8-composer (1.3.9): Loading from cache
    Created project in inthmmgt
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for 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.
Problem 2
- Installation request for drupal/core 8.5.3 -> satisfiable by drupal/core[8.5.3].
- drupal/core 8.5.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 3
- Installation request for easyrdf/easyrdf 0.9.1 -> satisfiable by easyrdf/easyrdf[0.9.1].
- easyrdf/easyrdf 0.9.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 4
- Installation request for behat/behat v3.4.3 -> satisfiable by behat/behat[v3.4.3].
- behat/behat v3.4.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 5
- alchemy/zippy 0.4.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- drupal/console 1.8.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
- Installation request for drupal/console 1.8.0 -> satisfiable by drupal/console[1.8.0].

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/15-xml.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-curl.ini
- /etc/php/7.2/cli/conf.d/20-dom.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-simplexml.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
- /etc/php/7.2/cli/conf.d/20-wddx.ini
- /etc/php/7.2/cli/conf.d/20-xmlreader.ini
- /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.2/cli/conf.d/20-xsl.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
[error] Command composer create-project --working-dir=/tmp/local-siteMxuWmx pantheon-systems/example-drops-8-composer inthmmgt -n failed with exit code 2

@jdschwam
Copy link

Were you able to fix this. I am getting the same error.

@greg-1-anderson
Copy link
Member

There are two ways forward here:

  1. You could fix this problem by installing the PHP extensions that are in your error messages (mbstring, gd)
  2. Terminus Build Tools could fix this problem by running composer create-project with the --ignore-platform-reqs flag

Option #2 means that your site wouldn't run locally unless you installed the missing php extensions; however, the inability of being able to run your site locally would not interfere with your ability to run it on Pantheon, which is the usual use case here.

@greg-1-anderson
Copy link
Member

If using the master branch of the Terminus Build Tools plugin, insert --ignore-platform-reqs here:

https://github.com/pantheon-systems/terminus-build-tools-plugin/blob/master/src/Commands/BuildToolsBase.php#L433

A pull request would be welcome if this works for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants