Compiling python from soruce vs RPM ?

H

howa

I have compiled python 2.5 from source

i.e.

../configure
make
make install


but when i try to install another package require python, seems it
can't regonize python...

e.g..


/usr/bin/python is needed by xyz
 
H

hlubenow

howa said:
I have compiled python 2.5 from source

i.e.

./configure
make
make install


but when i try to install another package require python, seems it
can't regonize python...

e.g..


/usr/bin/python is needed by xyz

Does "/usr/bin/python" exist ?

Why haven't you installed via rpm ?

H.
 
P

Paul Boddie

howa said:
I have compiled python 2.5 from source

i.e.

./configure
make
make install

By default, configure uses /usr/local as the "prefix", not /usr...
but when i try to install another package require python, seems it
can't regonize python...

e.g..


/usr/bin/python is needed by xyz

Consequently, by default, Python will be found at /usr/local/bin/
python, not /usr/bin/python as you seem to require. Try building from
source again:

make clean # probably needed if rebuilding in the same place
../configure --prefix=/usr
make
make install

Since /usr/bin/python isn't found, it doesn't look like there's an
existing version of Python that you might overwrite, but it's
important to verify such things when installing software. That's where
your distribution's packages have an advantage, and it's arguably a
better idea to install such packages instead, possibly building them
from source if no binary packages exist yet for Python 2.5. (If no
source packages exist, you have a bit more work to do.)

Paul
 
H

howa

Since /usr/bin/python isn't found, it doesn't look like there's an
existing version of Python that you might overwrite, but it's
important to verify such things when installing software. That's where
your distribution's packages have an advantage, and it's arguably a
better idea to install such packages instead, possibly building them
from source if no binary packages exist yet for Python 2.5. (If no
source packages exist, you have a bit more work to do.)

Paul


Thanks.


One more question:

How to uninstall using the source package?

the source package doesn't come with `make uninstall`?
 
P

Paul Boddie

One more question:

How to uninstall using the source package?

the source package doesn't come with `make uninstall`?

Right. That's another pitfall of most source distributions (ie. the
Python sources from python.org) compared to system packages (ie. the
package built from a source RPM or equivalent system source package).
If you want a really quick solution to this which seems to work much
of the time, look at checkinstall:

http://asic-linux.com.mx/~izto/checkinstall/

This tool will make system packages by taking control of the usual
build process, and you can then install and uninstall those system
packages.

Paul
 
H

howa

Right. That's another pitfall of most source distributions (ie. the
Python sources from python.org) compared to system packages (ie. the
package built from a source RPM or equivalent system source package).
If you want a really quick solution to this which seems to work much
of the time, look at checkinstall:

http://asic-linux.com.mx/~izto/checkinstall/

This tool will make system packages by taking control of the usual
build process, and you can then install and uninstall those system
packages.

Paul

but i have the source package being installed...so any method/script
to remove them?

since finally i want to install via RPM ...

thanks anyway
 
P

Paul Boddie

but i have the source package being installed...so any method/script
to remove them?

since finally i want to install via RPM ...

You could use checkinstall to make a package, install it (forcibly if
necessary), then remove it. That might wipe away the things installed
when you did "make install" since checkinstall should note which files
were to be installed, add them to its manifest, then construct the
package such that those files will be removed when the package is
uninstalled.

No promises, though...

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top