Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In following the install instructions for D8:
Win/Mac/Linux host$ vagrant ssh
vagrant guest$ cd ~/sites/drupal8
vagrant guest$ git clone --branch 8.x http://git.drupal.org/project/drupal.git .
vagrant guest$ drush @drupal8 si standard -y
I get this error on the last step:
vagrant@precise32:~/sites/drupal8/public$ drush @drupal8 si standard -y
Command site-install needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command. [error]
The drush command 'si standard' could not be executed. [error]
The directory /var/www/drupal8 does not contain a valid Drupal installation
I should also be able to install it manually, but there's something weird with the file permissions has been stopping me from setting the write permissions on sites/default/files to be world writable.
Both options should work though and neither seems to.
Are we using the head version of Drush 7?
Comment | File | Size | Author |
---|---|---|---|
#5 | vdd-install-d8-2238729-5.patch | 459 bytes | ericrdb |
#3 | drupal-8-install-error.png | 112.62 KB | rootwork |
Comments
Comment #1
ericrdb CreditAttribution: ericrdb commentedSorry to hear about the challenges with Drupal8 installation. Yep, we are using Drush 7.
It looks like you cloned to:
And ran your drush si command from:
The drush command complains that there's no drupal core, which would be true if it was downloaded to the /var/www/drupal8 directory.
I just performed the below on a fresh checkout with no prior existing Drupal8 directory:
You might reset the config.json (or project) to a clean checkout and trying again.
EDIT: correct paths.
Comment #2
mgiffordOk, this got me closer:
vagrant@precise32:~/sites/drupal8$ drush @drupal8 si standard -y
You are about to empty any Config directories and DROP all tables in your 'drupal8' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a few seconds ... [ok]
Installation complete. User name: root User password: root [ok]
Congratulations, you installed Drupal!Drupal installation complete [status]
But still hit this error http://drupal8.dev/drupal8/:
( ! ) Fatal error: Class '__TwigTemplate_57ad779fd8b7bb4bf3a23848c79b3129849efea611aa87c1a1484dfe056f12aa' not found in /var/www/drupal8/core/lib/Drupal/Core/Template/TwigEnvironment.php on line 125
It's a bit baffling as I've used D8 for a long time and don't think I've run into this error... Seems to be tied to the permissions of the files directory...
Comment #3
rootworkI'm seeing the same behavior:
- A manual install fails with errors about sites/default/files, even if I create it and chmod/chown it myself. I suspect this has something to do with the user/group settings set in the box, but I'm not sure what the right ones are.
- A drush install, from inside the box, using
drush @drupal8 si standard -y
, succeeds at the command line, but then when I try to load the site I get the same error Mike sees: "Fatal error: Class '__TwigTemplate_5889a8cc98ca6933e91c59b349178db252226001da4243451e50031f12ed43c2' not found in /var/www/drupal8/public/core/lib/Drupal/Core/Template/TwigEnvironment.php on line 125"I haven't had any issues installing Drupal 7; this seems specific to Drupal 8 installs.
Comment #4
rootworkI wonder if this has a similar cause to #2054985: default file permissions cause problems for drupal7 sites and drupal8 installs? That was on a previous version (and also somewhat mysteriously marked a minor documentation bug), but maybe whatever was causing that has somehow resurfaced?
Comment #5
ericrdb CreditAttribution: ericrdb commentedThis patch sets apache to use vagrant:vagrant instead of www-data:www-data. Fixes the issue for me.
I don't yet see any downstream adverse affects for using vagrant:vagrant as the service account locally with apache. Please advise if I'm overlooking anything.
Thanks
Comment #6
mgiffordThat works great. Thanks @ericdb!
Comment #7
rootworkAgreed -- patch applies cleanly, and Drupal installs cleanly as a result :)
Just in time for the Portland frontend meetup on Twig tonight. Thanks!
Comment #9
ericrdb CreditAttribution: ericrdb commentedCommitted - thanks!
Comment #10
mgiffordGreat.. Thanks for the mention. But in running vagrant provision I get the following error:
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/vdd/recipes/apache.rb:16:in `from_file'
After commenting that out and running it I get it for line 17.
It could well be that I'm doing something wrong, but I thought's that how I was supposed to use this.
Comment #11
rootworkWhen I tried the patch out, I wiped the vagrant instance completely and started from scratch, and it worked. But I agree
vagrant provision
after patching should work, at least as I understand it. Maybe someone with more vagrant chops can offer insight.Comment #12
mgiffordJust changing status back. No need to revert, but..
Comment #13
ericrdb CreditAttribution: ericrdb commentedI'm not able to re-create this issue. What are the steps taken?
With a clean checkout, I destroyed the existing box I had, performed "vagrant up" did a "vagrant provision". Nothing yet...
Thanks
Comment #14
mgiffordAfter you've installed your VM, run:
vagrant@precise32:~$ sudo ./postinstall.sh
I actually ran into this error, but not sure it mattered:
Then run:
My-Laptop:vdd $ vagrant reload
Which gives you this:
==> default: VM already provisioned. Run `vagrant provision` or use `--provision` to force it
My-Laptop:vdd $ vagrant provision
Which then gives me:
[2014-04-19T18:01:22+00:00] INFO: Could not find previously defined grants.sql resource
[2014-04-19T18:01:22+00:00] WARN: Cloning resource attributes for service[mysql] from prior resource (CHEF-3694)
[2014-04-19T18:01:22+00:00] WARN: Previous service[mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:154:in `from_file'
[2014-04-19T18:01:22+00:00] WARN: Current service[mysql]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mysql/recipes/server.rb:218:in `from_file'
================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-2/cookbooks/vdd/recipes/apache.rb
================================================================================
Chef::Exceptions::ImmutableAttributeModification
------------------------------------------------
Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'
Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/vdd/recipes/apache.rb:25:in `from_file'
Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/vdd/recipes/apache.rb:
18: append true
19: end
20:
21: web_app "localhost" do
22: template "localhost.conf.erb"
23: end
24:
25>> node['apache']['user'] = "vagrant"
26: node['apache']['group'] = "vagrant"
27:
28: template "/etc/apache2/conf.d/vdd_apache.conf" do
29: source "vdd_apache.conf.erb"
30: mode "0644"
31: notifies :restart, "service[apache2]", :delayed
32: end
33:
[2014-04-19T18:01:22+00:00] ERROR: Running exception handlers
[2014-04-19T18:01:22+00:00] ERROR: Exception handlers complete
[2014-04-19T18:01:22+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-04-19T18:01:22+00:00] ERROR: Node attributes are read-only when you do not specify which precedence level to set. To set an attribute use code like `node.default["key"] = "value"'
[2014-04-19T18:01:22+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Comment #15
mgiffordIt is also my habit (although not here) to run:
$ sudo apt-get update
$ sudo apt-get upgrade -y
It's probably not required for a virtual box, but gets the environment closer to what I would use on a live server so is useful. Ideally it would be as close as possible.
Comment #16
danylevskyi