I am trying to install drupal 10 using ddev. I followed the instructions here: https://ddev.readthedocs.io/en/latest/users/quickstart/#drupal
The process fails at step 5.
$ ddev composer create drupal/recommended-project
Warning: MOST EXISTING CONTENT in the composer root (/home/worryword/Development/drupal) will be deleted by the composer create-project operation. Only .ddev, .git and .tarballs will be preserved.
Would you like to continue? [Y/n] (yes): y
Removing any existing files in composer root
Executing composer command: [composer create-project drupal/recommended-project --no-install /tmp/wclwTh]
Creating a "drupal/recommended-project" project at "/tmp/wclwTh"
Installing drupal/recommended-project (10.1.1)
Failed to download drupal/recommended-project from dist: /var/www/html/vendor/composer does not exist and could not be created.
Now trying to download from source
- Syncing drupal/recommended-project (10.1.1) into cache
- Installing drupal/recommended-project (10.1.1): Cloning 22b8828acc from cache
Created project in /tmp/wclwTh
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? y
Moving install to composer root
rsync: [receiver] mkstemp "/var/www/html/.composer.json.TKcwZ0" failed: Permission denied (13)
rsync: [receiver] mkstemp "/var/www/html/.composer.lock.DAm57Z" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
Failed to create project: ComposeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-drupal docker-compose -f /home/worryword/Development/drupal/.ddev/.ddev-docker-compose-full.yaml exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/wclwTh/" "/var/www/html/")', action='[exec -w /var/www/html -T web bash -c set -eu && ( rsync -rltgopD "/tmp/wclwTh/" "/var/www/html/")]', err='exit status 23', stdout='', stderr='rsync: [receiver] mkstemp "/var/www/html/.composer.json.TKcwZ0" failed: Permission denied (13)
rsync: [receiver] mkstemp "/var/www/html/.composer.lock.DAm57Z" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]'
I tried following these troubleshooting steps: https://ddev.readthedocs.io/en/latest/users/usage/troubleshooting/#general-troubleshooting-strategies
I tried restarting docker.
I tried using drupal 9 instead of 10.
Nothing else seems relevant to my problem.
What can I do about this error?
Turns out Docker Desktop for Linux is not Compatible with DDEV as stated here:
https://ddev.readthedocs.io/en/latest/users/install/docker-installation/
Avoid Docker Desktop for Linux
Current releases of Docker Desktop for Linux are not usable with DDEV for a number of reasons, and also exhibit some of the problems Docker Desktop has on other platforms. Please use the normal docker-ce installation described here.
I had to use regular old docker-ce.
Because I'm on Linux Mint I also had to do this:
https://forums.linuxmint.com/viewtopic.php?t=395200
And then also set nameserver in /etc/resolv.conf to 8.8.8.8: