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

Destination /usr/local/bin not writable during Drush install on Debian 9 #1539

Closed
heigh8 opened this issue Sep 8, 2017 · 12 comments
Closed

Comments

@heigh8
Copy link

heigh8 commented Sep 8, 2017

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant: 1.9.1
ansible: 2.2.1.0
vboxmanage : 5.1.26r117224

Your OS

  • Linux (debian 9)

Full console output

Summary

I get

TASK [geerlingguy.drush : Install Drush.] **************************************
fatal: [boxname]: FAILED! => {"changed": false, "failed": true, "msg": "Destination /usr/local/bin not writable"}

on vagrant up.
reason is /usr/local/bin does not exist on vm.

@geerlingguy
Copy link
Owner

Strange—the tests passed, at least: https://travis-ci.org/geerlingguy/drupal-vm/builds/269525498

But they're using Docker, and the Docker base image is a little different than the VirtualBox Vagrant base box.

@geerlingguy
Copy link
Owner

I'm testing this now using the following config.yml:

vagrant_box: geerlingguy/debian9

I'll let you know if I can replicate the issue locally.

@geerlingguy
Copy link
Owner

In my environment, the drush tasks all completed successfully:

TASK [geerlingguy.drush : Check current state.] ********************************
ok: [drupalvm]

TASK [geerlingguy.drush : Perform cleanup of old symlink.] *********************
skipping: [drupalvm]

TASK [geerlingguy.drush : Install Drush.] **************************************
changed: [drupalvm]

TASK [geerlingguy.drush : Ensure Drush is executable.] *************************
changed: [drupalvm]

TASK [geerlingguy.drush : Clone Drush from GitHub.] ****************************
skipping: [drupalvm]

TASK [geerlingguy.drush : Check for composer.json] *****************************
skipping: [drupalvm]

TASK [geerlingguy.drush : Ensure Drush can be installed on Debian Wheezy.] *****
skipping: [drupalvm]

TASK [geerlingguy.drush : Install Drush dependencies with Composer.] ***********
skipping: [drupalvm]

TASK [geerlingguy.drush : Create drush symlink.] *******************************
skipping: [drupalvm]

TASK [geerlingguy.drush : Run drush to finish setting it up.] ******************
skipping: [drupalvm]

Are you using a different base image besides geerlingguy/debian9? Any other configuration differences?

@geerlingguy
Copy link
Owner

Ah, just realized—are you running Debian 9 as your workstation and also using debian9 as the base box? Or are you using a different base box? And same question as above still—any other config.yml changes?

@geerlingguy geerlingguy changed the title /usr/local/bin does not exist on vm Destination /usr/local/bin not writable during Drush install on Debian 9 Sep 8, 2017
@heigh8
Copy link
Author

heigh8 commented Sep 11, 2017

debian 9 is the workstation, the base box is debian 8.
and yes - we do have some custom config.yaml, I'll attach it.
config.yml.txt
Thanks!

@heigh8 heigh8 closed this as completed Sep 11, 2017
@heigh8
Copy link
Author

heigh8 commented Sep 11, 2017

sorry didn't mean to close..

@heigh8 heigh8 reopened this Sep 11, 2017
@oxyc
Copy link
Collaborator

oxyc commented Sep 23, 2017

Looking at your config.yml your vagrant_hostname is invalid (the _), and there's also a few duplicate options.

@oxyc
Copy link
Collaborator

oxyc commented Sep 23, 2017

I can reproduce:

TASK [geerlingguy.drush : Install Drush.] **************************************
fatal: [project_name]: FAILED! => {"changed": false, "failed": true, "msg": "Destination /usr/local/bin not writable"}

vagrant@project-name:~$ ls /usr/local
etc  games  include  lib  man  sbin  share  src
vagrant@project-name:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Seems we just need to ensure the path exists.

@oxyc
Copy link
Collaborator

oxyc commented Sep 23, 2017

@geerlingguy should that be taken care of in the drush role or in Drupal VM?

@geerlingguy
Copy link
Owner

Annoyingly, the default $PATH on Debian 8 even includes it:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

But it also includes sbin, which does exist. So I think I'll make the path an OS default variable and set a default for Debian.

@geerlingguy
Copy link
Owner

Or actually I can just ensure bin exists. That might be simpler.

@geerlingguy
Copy link
Owner

Fixed upstream; will commit the fix in a few minutes.

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

No branches or pull requests

3 participants