How to install python on clean RH7.1 install
s713221 at student.gu.edu.au
Fri Jun 22 21:25:57 EDT 2001
> I'm trying to install Python 2.1-5 onto a newly installed RH7.1. The
> RH install was done pretty cleanly, so not a lot of the RPMs have been
> installed (I've installed some along the way, as dependencies came
> My quesions are these:
> 1). Is it possible to "upgrade" the python 1.5.2 that is installed
> with RH7.1? (I couldn't easily avoid installing it - because it was a
> dependency for a lot of packages. That said, I cannot easily
> uninstall the RPM for 1.5.2).
> 2). If not, what way is more or less a fail-safe way of installing
> python into a new directory. I have tried the following already:
> - installing from the src.rpm file -- the installer stopped short of
> creating the RPM file... something about it not finding a lot of files
> (that it was to have compiled). It made it through the check, and did
> about 5 minutes of compiling, then stopped.
> - installing from the rpm file. The dependencies failed were
> libcrypto, and libssl -- but I have NO idea where to find these
> (preferrably RPMs).
> Any ideas would be greatly appreciated!
To find out which packages require python, use the following command:
rpm -q --whatrequires python
I haven't tried to replace python1.5 in a distro, prefering to install
python2.1 beside the system python, but if I were going to do this, I'd
install python2.1 either from the source using --altinstall rather than
--install, with --prefix=/usr during the configure step, or build and
install python2 from any of the python2*src.rpm files out there.
This will install python2 under /usr, but your /usr/bin directory will
(or should) look like this (for the python2.src.rpm option)
-rwxr-xr-x 1 root root 423260 Oct 1 2000 python ->
-rwxr-xr-x 1 root root 423260 Oct 1 2000 python1.5
-rwxr-xr-x 2 root root 521020 Jun 15 20:39 python2 ->
-rwxr-xr-x 2 root root 521020 Jun 15 20:39 python2.1
Then I'd get all the packages that depend on python1.5, preferably in
src.rpm form. Go to /usr/bin and swap around the default python
mv python python-old
ln -s python2.1 python
and build each of the dependancies packages, but don't install them.
Fix the hacking you did on the /usr/bin directory
mv python-old python
Then rebuild the python2 src.rpm but edit the spec file so that it build
python2 as the package python
rpm -i python2*src.rpm
(Focus on the first 5 to 8 lines, and save the file)
rpm -bb python.spec
rpm -i python<version>.rpm <plus all your other packages>
If things stuff up, you may have to go back to your old packages. Cd to
your CD, and
rpm -U --oldpackage python<oldpythonversion>.rpm <plus all your other
In fact, if you're worried, I'd build all your dependancies packages
from source (Which you can retrieve from your src.rpm packages after you
install them.), making sure they go into python2.1, test each one out,
and then do what I suggested above.
What you have to ask, is it worth it? Will a coexistant install do what
you require with far less effort than a total replace?
You need to install the development packages of crypto and ssl, they'll
be on your cd. Also, install the readlines development library before
your build. With this, python will install readlines into the binary,
and when you're working in interactive mode, you'll be able to repeat
any of your previous commands by tapping the up-down arrows (Like
xterm/bash, as opposed to the _ trick, which only repeats the last
command.) This also goes for any other modules that you want, but will
probably require system libraries to build. (Read the python
documentation for hints as to this.)
Joal Heagney is: _____ _____
/\ _ __ __ _ | | _ ___ |
/__\|\ || ||__ |\ || |___|/_\|___] |
/ \ \_||__ ||___| \_|! | | \ \ !
More information about the Python-list