File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments