Closed ravbaba closed 8 years ago
@ravbaba - It's likely your shared directory is not configured correctly; can you post the shared folders section, and the apache vhosts section, of your config.yml?
vagrant_synced_folders:
- local_path: ~/Projects/drupalvm
destination: /var/www
id: drupal
type: nfs
create: true
apache_vhosts:
- servername: "{{ drupal_domain }}"
documentroot: "{{ drupal_core_path }}"
- servername: "xhprof.drupalvm.dev"
documentroot: "/usr/share/php/xhprof_html"
- servername: "pimpmylog.drupalvm.dev"
documentroot: "/usr/share/php/pimpmylog"
Ah, sorry, one more thing too - what's the drupal_core_path
set to?
And I guess one more thing—are you using the geerlingguy.ubuntu1404
base box or something else?
drupal_core_path: "/var/www/drupal"
@ravbaba - Just for a quick test, can you remove the type: nfs
line from the synced folder configuration, then do a vagrant reload --provision
, and see if it works?
@geerlingguy - it works when I remove the line. It looks like nfs configuration on my ubuntu machine is not correct because it works on my mac with nfs.
me too on trusty
I think it might be something related to nfs etc/exports not being handled properly i.e. removed after a failed attempt, such as the ansible playbooks force requirements gotcha
Hi. I had the same problem as ravbaba and fixed it by installing Guest Additions to Virtualbox. See: http://askubuntu.com/questions/22743/how-do-i-install-guest-additions-in-a-virtualbox-vm (Installing Guest Additions from a Terminal)
Can everyone who's having this issue also look at @nateswart's blog post on the topic and see if it helps? https://nateofnine.com/2015/10/25/drupalvm-nfs-on-ubuntu/
@geerlingguy followed the steps in the link you mentioned, and still having this problem. Running the same setup as the opener of this issue.
Part of my error message:
msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'apache2' 'apache2-utils'' failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:",
LC_ALL = (unset),
LC_TIME = "de_BE.UTF-8",
LC_MONETARY = "de_BE.UTF-8",
LC_CTYPE = "C",
LC_ADDRESS = "de_BE.UTF-8",
LC_TELEPHONE = "de_BE.UTF-8",
LC_NAME = "de_BE.UTF-8",
LC_MEASUREMENT = "de_BE.UTF-8",
LC_IDENTIFICATION = "de_BE.UTF-8",
LC_NUMERIC = "de_BE.UTF-8",
LC_PAPER = "de_BE.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb (--unpack):
error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
One thing I (finally) figured out is that if you have encryption turned on for your home folder NFS to the VM won't work. I realized I didn't call very much attention to it in that blog post so it's easy to miss.
@lilswif is there a line that begins with AcceptEnv LANG
in /etc/ssh/sshd_config
? Looks like you're passing your locale to the VM while this should have been prevented in https://github.com/geerlingguy/drupal-vm/issues/186
Edit:
Just realised that task runs too late to be effective on the initial provisioning. @geerlingguy any ideas how to prevent it on the initial provisioning already? pre_tasks
won't work as the variable is already present. Guess we could reset it... If we moved it here it would work if the user just re-ran vagrant provision
at least.
@lilswif to get it working ASAP you can follow the suggestions @geerlingguy linked to in the other issue.
still getting a error (see below) after trying:
ailed: [drupalvm] => (item=apache2,apache2-utils) => {"failed": true, "item": "apache2,apache2-utils"}
stderr: dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb (--unpack):
error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
stdout: Reading package lists...
Building dependency tree...
Reading state information...
apache2-utils is already the newest version.
The following packages were automatically installed and are no longer required:
libyaml-0-2 python-crypto python-httplib2 python-jinja2 python-markupsafe
python-paramiko python-pkg-resources python-support python-yaml sshpass
Use 'apt-get autoremove' to remove them.
Suggested packages:
www-browser apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
apache2
0 upgraded, 1 newly installed, 0 to remove and 35 not upgraded.
6 not fully installed or removed.
Need to get 0 B/144 kB of archives.
After this operation, 451 kB of additional disk space will be used.
(Reading database ... 63480 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb ...
Unpacking apache2 (2.4.16-4+deb.sury.org~trusty+4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'apache2' 'apache2-utils'' failed: dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb (--unpack):
error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Does the fix suggested in https://github.com/geerlingguy/drupal-vm/issues/85#issuecomment-134315326 fix the issue for anyone in this thread?
provisioning without nfs:true line works for me. Then, I add back that line and everything works ok.
In that case, it looks like the problem is basically that the html
folder needs to be created for Apache to work correctly, but it is not. I'm testing things on some Linux flavors this week, and ran into this problem myself. It looks like the same fix for #85 worked here:
html
inside the synced folder directory (by default ~/Sites/drupalvm
).vagrant provision
again.I'm going to look into a better way to make sure this issue doesn't occur on a fresh install, though. One other solution is to set your synced folder directory to something like ~/Sites/drupalvm/example
or something like that (I think, haven't tested personally).
@geerlingguy You're right, html folder is needed and automaticaly created by Apache.
Using a subfolder inside /var/www
solved that issue and no need to create /var/www/html
.
Default should recommand something like that
vagrant_synced_folders:
# The first synced folder will be used for the default Drupal installation, if
# build_makefile: is 'true'.
- local_path: ~/Sites/drupalvm
destination: /var/www/drupalvm
type: nfs
create: true
Fixed via the above commit, which updates the included example.config.yml and makes it so the default site is generated inside a subdir of the /var/www
directory instead of having the synced folder take over that directory completely.
I get the error for the ansible task "Ensure Apache is installed":
failed: [drupalvm] => (item=apache2,apache2-utils) => {"failed": true, "item": "apache2,apache2-utils"} stderr: dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb (--unpack): error setting ownership of
/var/www/html.dpkg-new': Operation not permitted Errors were encountered while processing: /var/cache/apt/archives/apache2_2.4.16-4+deb.sury.org~trusty+4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)`I am using: