From 0f9e79f64988324be0bfd73de3255e885336b4d3 Mon Sep 17 00:00:00 2001 From: Steve Moyer <6214608+smoyergh@users.noreply.github.com> Date: Wed, 3 Nov 2021 14:01:15 -0500 Subject: [PATCH] Better MongoDB build instructions wrt scons (#1) * Better MongoDB build instructions wrt scons Signed-off-by: Steve Moyer <6214608+smoyergh@users.noreply.github.com> * Add install to RHEL alternatives Signed-off-by: Steve Moyer <6214608+smoyergh@users.noreply.github.com> * export PATH just to be sure Signed-off-by: Steve Moyer <6214608+smoyergh@users.noreply.github.com> --- src/mongo/db/storage/hse/README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/mongo/db/storage/hse/README.md b/src/mongo/db/storage/hse/README.md index 795d9b687b9b7..183c7e4befddd 100644 --- a/src/mongo/db/storage/hse/README.md +++ b/src/mongo/db/storage/hse/README.md @@ -27,24 +27,41 @@ For example, building MongoDB requires * GCC 5.3.0 (or newer) or Clang 3.4 (or newer) * Python 2.7 -* SCons 2.3 +* SCons 2.3 (or newer) To help you with this process, below are examples of the packages required for several common Linux distributions. These are **in addition to** the packages required to build HSE. +### pip2 Command + +The examples below use `pip2` to install a version of `scons` that can +build MongoDB 3.4.17. If `pip2` is not available as a package for your +platform, you can install it as follows. + +```shell +curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py +sudo python2 get-pip.py +``` + ### RHEL 8 Packages ```shell sudo dnf install lz4-devel +sudo alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo alternatives --set python /usr/bin/python2 pip2 install --user scons +export PATH=$HOME/.local/bin:$PATH ``` ### Ubuntu 18.04 Packages ```shell -sudo apt install scons liblz4-dev +sudo apt install liblz4-dev +sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 +sudo update-alternatives --set python /usr/bin/python2 +pip2 install --user scons +export PATH=$HOME/.local/bin:$PATH ```