Skip to content

Instantly share code, notes, and snippets.

@centminmod
Last active June 5, 2020 15:56
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save centminmod/e050cf02794fb5bcdf3090c28efab202 to your computer and use it in GitHub Desktop.
Save centminmod/e050cf02794fb5bcdf3090c28efab202 to your computer and use it in GitHub Desktop.
fix python34/python34u and python36/python36u conflicts on centos 7 in centminmod 123.09beta01 curl -4s https://gist.github.com/centminmod/e050cf02794fb5bcdf3090c28efab202/raw/python-conflict-fix.sh | bash
#!/bin/bash
# fix python34/python34u and python36/python36u conflicts
if [[ "$(rpm -qa python34u)" ]]; then
# remove ius community python34u
yum -y remove python34u python34u-devel python34u-pip python34u-setuptools python34u-tools python34u-libs python34u-tkinter
# install epel python34
yum -y install python34 python34-devel python34-pip python34-setuptools python34-tools python34-libs python34-tkinter
fi
# only apply to centos 7 as centos 6 epel doesn't have python36
if [[ -f /bin/systemctl && "$(rpm -qa python36u)" ]]; then
# remove ius community python36u
yum -y remove python36u python36u-devel python36u-pip python36u-setuptools python36u-tools python36u-libs python36u-tkinter
# install epel python36
yum -y install python36 python36-devel python36-pip python36-setuptools python36-tools python36-libs python36-tkinter
fi
if [[ ! "$(rpm -qa cmake3)" ]]; then
# reinstall removed dependencies from above removed ius community packages
yum -y install cmake3 cmake3-data
fi
@Sparrow1029
Copy link

Thanks for sharing this script!

@CthulhuMythos
Copy link

Thank you

@apark-bnea
Copy link

Thank you! Saved tons of errors.

@divyalakshmi24
Copy link

yes!!! it saved me..Thanks

@neo3matrix
Copy link

Thank you so much.. saved my time and efforts and helped me from braking my centos 7 setup. :)
Thanks a ton!!

@akrauza
Copy link

akrauza commented Jun 5, 2020

+1 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment