drupal-vm icon indicating copy to clipboard operation
drupal-vm copied to clipboard

Provisioning fails with pip installation

Open ayalon opened this issue 8 years ago • 9 comments

Issue Type

  • Bug Report

Your Environment

Vagrant 2.0.2 VMWare Prof 14.1 no local ansible

Your OS

  • macOS Sierra
  • Windows 10

Full console output

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

curl https://bootstrap.pypa.io/get-pip.py | sudo python

Stdout from the command:

Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
Collecting setuptools
  Downloading setuptools-38.5.1-py2.py3-none-any.whl (489kB)
Collecting wheel
  Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 8.1.2


Stderr from the command:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1558k  100 1558k    0     0  2233k      0 --:--:-- --:--:-- --:--:-- 2232k
The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/vagrant/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/tmp/tmp3r7qI9/pip.zip/pip/req/req_install.py:1025: UserWarning: Module pip was already imported from /tmp/tmp3r7qI9/pip.zip/pip/__init__.py, but /usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg is being added to sys.path
Cannot remove entries from nonexistent file /usr/local/lib/python2.7/dist-packages/easy-install.pth
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.`

Summary

The installation of pip fails.

ayalon avatar Mar 02 '18 12:03 ayalon

I noticed you have 'Windows' and 'macOS' selected for your OS. Are you trying this on both OSes and it's failing? Or just on Windows?

Also, can you give more detail as to the version of Drupal VM you're using? Did you download master or are you using the latest stable release?

geerlingguy avatar Mar 05 '18 19:03 geerlingguy

Its happening on both OSes if you are not using a local ansible. I cloned the master 4 days ago.

I fixed it by running "sudo apt-get install python-pip" inside the Drupal VM. Then pip was installed and the step was skipped.

ayalon avatar Mar 05 '18 19:03 ayalon

Any chance you have vagrant-cachier installed? vagrant plugin list

oxyc avatar Mar 20 '18 20:03 oxyc

Confirming this issue. I used tag 4.8.0 instead with no problem.

cnovick-doj avatar Jun 01 '18 13:06 cnovick-doj

Using master, from today, and setup with Centos6, PHP 5.6.

Error on vagrant up:

File "/tmp/tmpYRwVbU/pip.zip/pip/_internal/__init__.py", line 42, in <module>
  File "/tmp/tmpYRwVbU/pip.zip/pip/_internal/cmdoptions.py", line 16, in <module>
  File "/tmp/tmpYRwVbU/pip.zip/pip/_internal/index.py", line 526
    {str(c.version) for c in all_candidates},
                      ^
SyntaxError: invalid syntax

I had to install pip locally, change Vagrantfile as such:

    #provisioner == :ansible_local && ansible.install_mode = 'pip'
    provisioner == :ansible_local

and rerun vagrant provision.

jhchnc avatar Jun 28 '18 18:06 jhchnc

PLAY RECAP ********************************************************************* mdo4 : ok=161 changed=4 unreachable=0 failed=1

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

TASK [geerlingguy.firewall : Check if firewalld package is installed (on RHEL).] *** fatal: [mdo4]: FAILED! => {"changed": false, "cmd": ["yum", "list", "installed", "firewalld"], "delta": "0:00:00.294185", "end": "2018-10-29 16:32:43.322808", "msg": "non-zero return code", "rc": 1, "start": "2018-10-29 16:32:43.028623", "stderr": "Error: No matching Packages to list", "stderr_lines": ["Error: No matching Packages to list"], "stdout": "Loaded plugins: fastestmirror", "stdout_lines": ["Loaded plugins: fastestmirror"]} ...ignoring

I ran into this issue while trying to install D8 on a CentOS 6 VM. I followed the above instructions for installing pip yum -y install python-pip and changing the Vagrantfile provisioner line, which got me past the initial problem which was pip causing the provisioning to fail, but now I'm stuck on this.

JasonWeakley avatar Oct 29 '18 17:10 JasonWeakley

ok... so I notice here that in CentOS 7 its looking for firewalld, but in CentOS 6 it should be looking for iptables... so how/why is it that I have installed CentOS 6 and its somehow looking for firewalld? https://www.tecmint.com/install-drupal-in-centos-rhel-fedora/

JasonWeakley avatar Oct 29 '18 18:10 JasonWeakley

Fixed it... the config.yml needs to be changed to:

firewall_enabled: false

JasonWeakley avatar Oct 29 '18 19:10 JasonWeakley

I am closing issues more than 6 months old which are not approved feature requests or definitively reproducible bugs affecting most users of Drupal VM; if you feel like this is still a reproducible issue with Drupal VM or something that should still be worked on, please open a new issue in the Drupal VM issue queue. I am trying to clean up some older issues which were hard or impossible to reproduce and debug.

Thank you!

geerlingguy avatar Dec 28 '18 23:12 geerlingguy