Created
August 8, 2012 12:45
-
-
Save lsdr/3294842 to your computer and use it in GitHub Desktop.
alt-install python2.7 on a x86_64 centos6 box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Python 2.7.3 alternatively | |
# original script: | |
# https://github.com/bngsudheer/bangadmin/blob/master/linux/centos/6/x86_64/build-python-27.sh | |
# | |
yum groupinstall "development tools" -y | |
yum install -y readline-devel openssl-devel gmp-devel \ | |
ncurses-devel gdbm-devel zlib-devel expat-devel libGL-devel \ | |
tk tix gcc-c++ libX11-devel glibc-devel bzip2 tar tcl-devel \ | |
tk-devel pkgconfig tix-devel bzip2-devel sqlite-devel autoconf \ | |
db4-devel libffi-devel valgrind-devel | |
mkdir tmp | |
cd tmp | |
wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tgz | |
tar xvfz Python-2.7.3.tgz | |
cd Python-2.7.3 | |
./configure --prefix=/opt/python2.7 --enable-shared | |
make | |
make altinstall | |
echo "/opt/python2.7/lib" >> /etc/ld.so.conf.d/opt-python2.7.conf | |
ldconfig | |
cd .. | |
cd .. | |
rm -rf tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment