How to install python on clean RH7.1 install
Ken
ken_chiba at hotmail.com
Sat Jun 23 18:33:31 EDT 2001
On Sat, 23 Jun 2001 11:25:57 +1000, Joal Heagney
<s713221 at student.gu.edu.au> wrote:
>Question 1.
>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 ->
>python1.5
>-rwxr-xr-x 1 root root 423260 Oct 1 2000 python1.5
>-rwxr-xr-x 2 root root 521020 Jun 15 20:39 python2 ->
>python2.1
>-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
>cd /usr/bin
>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
>rm python
>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
>cd /usr/src/RPM/SPECS
>emacs python.spec
>(Focus on the first 5 to 8 lines, and save the file)
>rpm -bb python.spec
>cd /usr/src/RPM/RPMS/i386
>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
>old packages>
>
>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?
>
>Question 2.
>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: _____ _____
> /\ _ __ __ _ | | _ ___ |
> /__\|\ || ||__ |\ || |___|/_\|___] |
> / \ \_||__ ||___| \_|! | | \ \ !
Thanks for your response. I'm going to give up on the idea of
replacing 1.5 for now... in the effort to get 2.1-5 up.
I'm still stuck. I already have the rpm openssl (and its development
library) installed, and the rpm install for python still claims that
it's failing dependencies for the files in question. Here is a
snippet of the RPM install, using -vv
-----------------------
# rpm -i -vv python2-2.1-5.i386.rpm
...
D: Requires: libutil.so.1 YES (db
provides)
D: opening db index /var/lib/rpm/Name create mode=0x42
D: Requires: libcrypto.so.0.9.6 NO
D: package python2-2.1-5 require not satisfied: libcrypto.so.0.9.6
D: Requires: libcrypt.so.1 YES (db
provides)
...
D: Requires: libreadline.so.4.1 YES (db
provides)
D: Requires: libssl.so.0.9.6 NO
D: package python2-2.1-5 require not satisfied: libssl.so.0.9.6
...
D: opening db index /var/lib/rpm/Conflictname create mode=0x42
error: failed dependencies:
libcrypto.so.0.9.6 is needed by python2-2.1-5
libssl.so.0.9.6 is needed by python2-2.1-5
D: ========== recording tsort relations
D: ========== tsorting packages
D: 0 (1,1) python2-2.1-5
D: ========== successors only (presentation order)
D: closed db index /var/lib/rpm/Depends
D: closed db index /var/lib/rpm/Conflictname
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
-------------
You can see that it failed the dependencies for the files
libcrypto.so.0.9.6, and libssl.so.0.9.6.
Just in case I was losing it, I checked for the RPMs the files would
be in by running:
# rpm -qf /usr/lib/libssl.so.0.9.6
openssl-0.9.6-3
# rpm -qf /usr/lib/libcrypto.so.0.9.6
openssl-0.9.6-3
... which I'm assuming is telling me what RPMs the files exist in. To
double check, I ran the following:
# rpm -q openssl
openssl-0.9.6-3
... and verifying the openssl package gave me:
#rpm -V openssl
.. (nothing) - which I'm assuming means everything is well.
Please advise!
Thanks,
kc
More information about the Python-list
mailing list