Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Error when running the first time. #1962

Closed
CajuCLC opened this issue Aug 28, 2019 · 7 comments
Closed

Error when running the first time. #1962

CajuCLC opened this issue Aug 28, 2019 · 7 comments
Labels

Comments

@CajuCLC
Copy link

CajuCLC commented Aug 28, 2019

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 2.2.5
VirtualBox 6.0.10r132072
ansible 2.8.4
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/cajuclc/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]

Your OS

  • Linux Ubuntu 18.04

Full console output

I get this error when I run vagrant up

TASK [geerlingguy.apache : Ensure Apache is installed on Debian.] **************
fatal: [drupalvm]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n", "module_stdout": "Segmentation fault\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 139}

PLAY RECAP *********************************************************************
drupalvm                   : ok=29   changed=1    unreachable=0    failed=1    skipped=30   rescued=0    ignored=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Then I run vagrant provision and I get this error:

TASK [geerlingguy.drupal : Generate Drupal project with composer package in /tmp/composer-project (this may take a while).] ***
fatal: [drupalvm]: FAILED! => {"changed": true, "cmd": ["/usr/bin/composer", "create-project", "drupal-composer/drupal-project:8.x-dev", "/tmp/composer-project", "--prefer-dist", "--stability", "dev", "--no-interaction"], "delta": "0:00:58.693955", "end": "2019-08-28 16:30:55.829083", "msg": "non-zero return code", "rc": 2, "start": "2019-08-28 16:29:57.135128", "stderr": "Error: \"curl\" PHP extension not loaded; Prestissmo Composer plugin disabled.\nError: \"curl\" PHP extension not loaded; Prestissmo Composer plugin disabled.\nInstalling drupal-composer/drupal-project (8.x-dev ec0f41171516c18357ca4cda9068ee4cdeabaa19)\n  - Installing drupal-composer/drupal-project (8.x-dev ec0f411): Downloading (connecting...)\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bDownloading (100%)         \b\b\b\b\b\b\b\b\b\nCreated project in /tmp/composer-project\nError: \"curl\" PHP extension not loaded; Prestissmo Composer plugin disabled.\n> DrupalProject\\composer\\ScriptHandler::checkComposerVersion\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nYour requirements could not be resolved to an installable set of packages.\n\n  Problem 1\n    - drupal/core 8.8.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.6 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.0-rc1 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.0-beta2 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.0-beta1 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.0-alpha2 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.0-alpha1 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - drupal/core 8.7.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.\n    - Installation request for drupal/core ^8.7.0 -> satisfiable by drupal/core[8.7.0, 8.7.0-alpha1, 8.7.0-alpha2, 8.7.0-beta1, 8.7.0-beta2, 8.7.0-rc1, 8.7.1, 8.7.2, 8.7.3, 8.7.4, 8.7.5, 8.7.6, 8.7.x-dev, 8.8.x-dev].\n\n  To enable extensions, verify that they are enabled in your .ini files:\n    - /etc/php/7.3/cli/php.ini\n    - /etc/php/7.3/cli/conf.d/10-opcache.ini\n    - /etc/php/7.3/cli/conf.d/10-pdo.ini\n    - /etc/php/7.3/cli/conf.d/20-apcu.ini\n    - /etc/php/7.3/cli/conf.d/20-calendar.ini\n    - /etc/php/7.3/cli/conf.d/20-ctype.ini\n    - /etc/php/7.3/cli/conf.d/20-exif.ini\n    - /etc/php/7.3/cli/conf.d/20-fileinfo.ini\n    - /etc/php/7.3/cli/conf.d/20-ftp.ini\n    - /etc/php/7.3/cli/conf.d/20-gettext.ini\n    - /etc/php/7.3/cli/conf.d/20-iconv.ini\n    - /etc/php/7.3/cli/conf.d/20-json.ini\n    - /etc/php/7.3/cli/conf.d/20-phar.ini\n    - /etc/php/7.3/cli/conf.d/20-posix.ini\n    - /etc/php/7.3/cli/conf.d/20-readline.ini\n    - /etc/php/7.3/cli/conf.d/20-shmop.ini\n    - /etc/php/7.3/cli/conf.d/20-sockets.ini\n    - /etc/php/7.3/cli/conf.d/20-sysvmsg.ini\n    - /etc/php/7.3/cli/conf.d/20-sysvsem.ini\n    - /etc/php/7.3/cli/conf.d/20-sysvshm.ini\n    - /etc/php/7.3/cli/conf.d/20-tokenizer.ini\n    - /etc/php/7.3/cli/conf.d/20-yaml.ini\n  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.", "stderr_lines": ["Error: \"curl\" PHP extension not loaded; Prestissmo Composer plugin disabled.", "Error: \"curl\" PHP extension not loaded; Prestissmo Composer plugin disabled.", "Installing drupal-composer/drupal-project (8.x-dev ec0f41171516c18357ca4cda9068ee4cdeabaa19)", "  - Installing drupal-composer/drupal-project (8.x-dev ec0f411): Downloading (connecting...)\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bDownloading (100%)         \b\b\b\b\b\b\b\b\b", "Created project in /tmp/composer-project", "Error: \"curl\" PHP extension not loaded; Prestissmo Composer plugin disabled.", "> DrupalProject\\composer\\ScriptHandler::checkComposerVersion", "Loading composer repositories with package information", "Updating dependencies (including require-dev)", "Your requirements could not be resolved to an installable set of packages.", "", "  Problem 1", "    - drupal/core 8.8.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.6 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.0-rc1 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.0-beta2 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.0-beta1 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.0-alpha2 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.0-alpha1 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - drupal/core 8.7.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.", "    - Installation request for drupal/core ^8.7.0 -> satisfiable by drupal/core[8.7.0, 8.7.0-alpha1, 8.7.0-alpha2, 8.7.0-beta1, 8.7.0-beta2, 8.7.0-rc1, 8.7.1, 8.7.2, 8.7.3, 8.7.4, 8.7.5, 8.7.6, 8.7.x-dev, 8.8.x-dev].", "", "  To enable extensions, verify that they are enabled in your .ini files:", "    - /etc/php/7.3/cli/php.ini", "    - /etc/php/7.3/cli/conf.d/10-opcache.ini", "    - /etc/php/7.3/cli/conf.d/10-pdo.ini", "    - /etc/php/7.3/cli/conf.d/20-apcu.ini", "    - /etc/php/7.3/cli/conf.d/20-calendar.ini", "    - /etc/php/7.3/cli/conf.d/20-ctype.ini", "    - /etc/php/7.3/cli/conf.d/20-exif.ini", "    - /etc/php/7.3/cli/conf.d/20-fileinfo.ini", "    - /etc/php/7.3/cli/conf.d/20-ftp.ini", "    - /etc/php/7.3/cli/conf.d/20-gettext.ini", "    - /etc/php/7.3/cli/conf.d/20-iconv.ini", "    - /etc/php/7.3/cli/conf.d/20-json.ini", "    - /etc/php/7.3/cli/conf.d/20-phar.ini", "    - /etc/php/7.3/cli/conf.d/20-posix.ini", "    - /etc/php/7.3/cli/conf.d/20-readline.ini", "    - /etc/php/7.3/cli/conf.d/20-shmop.ini", "    - /etc/php/7.3/cli/conf.d/20-sockets.ini", "    - /etc/php/7.3/cli/conf.d/20-sysvmsg.ini", "    - /etc/php/7.3/cli/conf.d/20-sysvsem.ini", "    - /etc/php/7.3/cli/conf.d/20-sysvshm.ini", "    - /etc/php/7.3/cli/conf.d/20-tokenizer.ini", "    - /etc/php/7.3/cli/conf.d/20-yaml.ini", "  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode."], "stdout": "", "stdout_lines": []}

RUNNING HANDLER [geerlingguy.php : restart webserver] **************************

RUNNING HANDLER [geerlingguy.php : restart php-fpm] ****************************

PLAY RECAP *********************************************************************
drupalvm                   : ok=191  changed=12   unreachable=0    failed=1    skipped=341  rescued=0    ignored=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

@CajuCLC
Copy link
Author

CajuCLC commented Aug 28, 2019

I went inside the VM vagrant ssh and ran sudo apt-get install php-xml, then ran vagrant provision again and it started working.

@geerlingguy
Copy link
Owner

It looks like the problem is/was:

Problem 1
  - drupal/core 8.8.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system

Do you have any kind of customization in your config.yml file? By default php[version-here]-xml would be installed, see:

https://github.com/geerlingguy/ansible-role-php-versions/blob/master/vars/Debian.yml#L38

@CajuCLC
Copy link
Author

CajuCLC commented Aug 28, 2019

The only thing I changed was the local_path:
- local_path: /home/cajuclc/Sites/drupal/drupalvm/drupal-vm/ericdrupal

@geerlingguy
Copy link
Owner

Have you done a vagrant destroy -f and then vagrant up, and the same thing happens every time?

@CajuCLC
Copy link
Author

CajuCLC commented Aug 28, 2019

First time I tried I got stuck at the first error. So ran vagrant destroy -f. Second time I ran vagrant up it failed again as it did in the first time, so I ran vagrant provision and that's when I got the other error.
Then I went inside the VM and installed php-xml:

vagrant@drupalvm:~$ php -v
PHP 7.3.8-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug  7 2019 09:51:47) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.8-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
vagrant@drupalvm:~$ sudo apt-get install php-xml
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php7.3-xml
The following NEW packages will be installed:
  php-xml php7.3-xml
0 upgraded, 2 newly installed, 0 to remove and 145 not upgraded.
Need to get 109 kB of archives.
After this operation, 447 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.3-xml amd64 7.3.8-1+ubuntu16.04.1+deb.sury.org+1 [103 kB]
Get:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php-xml all 2:7.3+69+ubuntu16.04.1+deb.sury.org+2+php7.3 [6,028 B]
Fetched 109 kB in 0s (133 kB/s)
Selecting previously unselected package php7.3-xml.
(Reading database ... 71636 files and directories currently installed.)
Preparing to unpack .../php7.3-xml_7.3.8-1+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.3-xml (7.3.8-1+ubuntu16.04.1+deb.sury.org+1) ...
Selecting previously unselected package php-xml.
Preparing to unpack .../php-xml_2%3a7.3+69+ubuntu16.04.1+deb.sury.org+2+php7.3_all.deb ...
Unpacking php-xml (2:7.3+69+ubuntu16.04.1+deb.sury.org+2+php7.3) ...
Setting up php7.3-xml (7.3.8-1+ubuntu16.04.1+deb.sury.org+1) ...

Creating config file /etc/php/7.3/mods-available/dom.ini with new version

Creating config file /etc/php/7.3/mods-available/simplexml.ini with new version

Creating config file /etc/php/7.3/mods-available/wddx.ini with new version

Creating config file /etc/php/7.3/mods-available/xml.ini with new version

Creating config file /etc/php/7.3/mods-available/xmlreader.ini with new version

Creating config file /etc/php/7.3/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/7.3/mods-available/xsl.ini with new version
Setting up php-xml (2:7.3+69+ubuntu16.04.1+deb.sury.org+2+php7.3) ...

And now things are working.

@geerlingguy
Copy link
Owner

This looks like it's related to #1963 — basically the version switch from the default (7.2) to 7.1 (or maybe in some cases to 7.3?) could cause this issue, where the CLI version is screwy and different than the apache/default version...

Are you sure you downloaded Drupal VM straight from this repository though? This is definitely not a BLT project or any other file besides a single config.yml file with that one line of configuration change?

geerlingguy added a commit that referenced this issue Aug 29, 2019
…en installing different PHP version.
@geerlingguy
Copy link
Owner

I believe the above commit fixes this issue. Please try the latest master release and see if it's still an issue (I will be tagging a new release soon, as well).

dhaley pushed a commit to NREL/drupal-vm that referenced this issue Sep 4, 2019
…eerlingguy#1964: Purge php-common package when installing different PHP version.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants