Skip to content

Instantly share code, notes, and snippets.

@rmetzler
Created April 8, 2015 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmetzler/29addb7588a9a3f52127 to your computer and use it in GitHub Desktop.
Save rmetzler/29addb7588a9a3f52127 to your computer and use it in GitHub Desktop.
Build Python from source on SLES
#!/bin/bash
#
# shamelessly copied from http://stackoverflow.com/a/11371726
#
# Install Python 2.7.2 alternatively
#
zypper install -t pattern sdk_c_c++ -y
zypper install 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 -y
mkdir tmp
cd tmp
wget http://python.org/ftp/python/2.7.2/Python-2.7.2.tgz
tar xvfz Python-2.7.2.tgz
cd Python-2.7.2
./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