Skip to content

Commit d708275

Browse files
committed
Update cape2.sh
1 parent fa67747 commit d708275

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

installer/cape2.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -825,13 +825,7 @@ function install_mongo(){
825825
sudo apt-get install -y libpcre3-dev numactl cron
826826
sudo apt-get install -y mongodb-org
827827

828-
# Check pip version. Only pip3 versions 23+ have the '--break-system-packages' flag.
829-
PIP_VERSION=$(pip3 -V | awk '{print $2}' | cut -d'.' -f1)
830-
if [ "$PIP_VERSION" -ge 23 ]; then
831-
pip3 install pymongo -U --break-system-packages
832-
else
833-
pip3 install pymongo -U
834-
fi
828+
PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install pymongo -U --break-system-packages
835829

836830
sudo apt-get install -y ntp
837831
systemctl start ntp.service && sudo systemctl enable ntp.service
@@ -905,14 +899,7 @@ function install_elastic() {
905899
# echo "deb [signed-by=/etc/apt/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" > /etc/apt/sources.list.d/elastic-8.x.list
906900

907901
sudo apt-get update && sudo apt-get install -y elasticsearch
908-
909-
# Check pip version. Only pip3 versions 23+ have the '--break-system-packages' flag.
910-
PIP_VERSION=$(pip3 -V | awk '{print $2}' | cut -d'.' -f1)
911-
if [ "$PIP_VERSION" -ge 23 ]; then
912-
pip3 install elasticsearch --break-system-packages
913-
else
914-
pip3 install elasticsearch
915-
fi
902+
PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install elasticsearch
916903

917904
systemctl enable elasticsearch
918905
}

0 commit comments

Comments
 (0)