UnixServerAdmin

Server Administration & Management

How to install Python 2.6 from source code

# cd /usr/local/src

# wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tgz

# tar zxvf Python-2.6.5.tgz

# cd Python-2.6.5

# ./configure –prefix=/usr/python2.6 –with-threads –enable-shared

# make

# make install

Now set symlink

# ln -s /usr/python2.6/bin/python /usr/bin/python2.6

Add python lib path

# echo ‘/usr/python2.6/lib’ >> /etc/ld.so.conf.d/python2.6.conf

# ldconfig

Now check python working by running

# /usr/bin/python2.6

Advertisements

June 4, 2012 - Posted by | Tips & Tricks, Unix/Linux | , , , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: