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(){
825
825
sudo apt-get install -y libpcre3-dev numactl cron
826
826
sudo apt-get install -y mongodb-org
827
827
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
835
829
836
830
sudo apt-get install -y ntp
837
831
systemctl start ntp.service && sudo systemctl enable ntp.service
@@ -905,14 +899,7 @@ function install_elastic() {
905
899
# 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
906
900
907
901
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
916
903
917
904
systemctl enable elasticsearch
918
905
}
You can’t perform that action at this time.
0 commit comments