Open edX Tutor Installation: error: requirements/edx/base.txt: patch does not apply

I’m deploying Open edX on Ubuntu 16.04 by Tutor tools and it all works fine until I tried to run my forked version of edx-platform. I followed the instructions here: https://docs.tutor.overhang.io/configuration.html#running-a-fork-of-edx-platform

When I ran the command:

tutor images build openedx \
    --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/billtrn/edx-platform.git \
    --build-arg EDX_PLATFORM_VERSION=master

I have this error:

root@ubuntu-s-4vcpu-8gb-sgp1-01:~# tutor images build openedx     --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/billtrn/edx-platform.git     --build-arg EDX_PLATFORM_VERSION=master
⚠️  You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the 'docker' group. (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)
Building image docker.io/overhangio/openedx:10.0.11
docker build -t docker.io/overhangio/openedx:10.0.11 /root/.local/share/tutor/env/build/openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/billtrn/edx-platform.git --build-arg EDX_PLATFORM_VERSION=master
Sending build context to Docker daemon  32.77kB
Step 1/58 : FROM docker.io/ubuntu:16.04
 ---> c522ac0d6194
Step 2/58 : MAINTAINER Overhang.io <contact@overhang.io>
 ---> Using cache
 ---> 3de16b29f0b3
Step 3/58 : RUN apt update &&     apt install -y language-pack-en git build-essential software-properties-common curl git-core libmysqlclient-dev libxml2-dev libxslt1-dev libxmlsec1-dev libfreetype6-dev swig gcc g++     libbz2-dev libreadline-dev     gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libsqlite3-dev libxml2-dev libxmlsec1-dev libxslt1-dev lynx nodejs npm ntp pkg-config     && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 3c917b7d3467
Step 4/58 : ENV LC_ALL en_US.UTF-8
 ---> Using cache
 ---> ad6d0a5eec6e
Step 5/58 : ARG PYTHON_VERSION=3.5.9
 ---> Using cache
 ---> 0c23701d0a59
Step 6/58 : ENV PYENV_ROOT /opt/pyenv
 ---> Using cache
 ---> 619a4bf4fa75
Step 7/58 : RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v1.2.18 --depth 1     && $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION
 ---> Using cache
 ---> 09989e923657
Step 8/58 : ARG DOCKERIZE_VERSION=v0.6.1
 ---> Using cache
 ---> 5595ec782b8c
Step 9/58 : RUN curl -L -o /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz     && tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz     && rm /tmp/dockerize.tar.gz
 ---> Using cache
 ---> e4fa253ca53a
Step 10/58 : ARG EDX_PLATFORM_REPOSITORY=https://github.com/edx/edx-platform.git
 ---> Using cache
 ---> 06cb6feeca0f
Step 11/58 : ARG EDX_PLATFORM_VERSION=open-release/juniper.2
 ---> Using cache
 ---> 89330792e7c5
Step 12/58 : RUN mkdir -p /openedx/edx-platform &&     git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform
 ---> Using cache
 ---> 4d04cc01c0eb
Step 13/58 : WORKDIR /openedx/edx-platform
 ---> Using cache
 ---> aefb0a47b988
Step 14/58 : RUN curl https://github.com/overhangio/edx-platform/commit/5f21bbe77056d71ca61b97b6badcff3c1a31b858.patch | git apply -
 ---> Running in 66bb3f64e58b
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12413  100 12413    0     0  25902      0 --:--:-- --:--:-- --:--:-- 25914
error: patch failed: requirements/edx/base.txt:145
error: requirements/edx/base.txt: patch does not apply
error: patch failed: requirements/edx/development.txt:174
error: requirements/edx/development.txt: patch does not apply
error: patch failed: requirements/edx/testing.txt:168
error: requirements/edx/testing.txt: patch does not apply
The command '/bin/sh -c curl https://github.com/overhangio/edx-platform/commit/5f21bbe77056d71ca61b97b6badcff3c1a31b858.patch | git apply -' returned a non-zero code: 1
Error: Command failed with status 1: docker build -t docker.io/overhangio/openedx:10.0.11 /root/.local/share/tutor/env/build/openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/billtrn/edx-platform.git --build-arg EDX_PLATFORM_VERSION=master

Can someone tell me what is happening? Thank you!

Hi! Did you solve this problem? I also have this one, if you solved it could you explain it to me, please?

The error was caused by the fact that the fork was not made from the latest release tag. Please read all the fine prints here: Configuration and customisation — Tutor documentation

1 Like