Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RPM Installation

Many variants of GNU/Linux use the Red Hat Package Manager (RPM). The rpm tool automates the installation of software and the important dependencies among software components. If you don't know whether on not your GNU/Linux uses the Red Hat Package manager, you'll have to find a GNU/Linux expert to help you make that determination.

Red Hat Linux (and the related Fedora Core distributions) have a version of Python pre-installed. Sometimes, the pre-installed Python is an older release and needs an upgrade.

This book will focus on Fedora Core GNU/Linux because that's what I have running. Specifically, Fedora Core 8. You may have a different GNU/Linux, in which case, this procedure is close, but may not be precisely what you'll have to do.

The Red Hat and Fedora GNU/Linux installation of Python has three broad steps.

  1. Pre-installation: make backups.
  2. Installation: install Python. We'll focus on the simplest kind of installation.
  3. Post-installation: check to be sure everything worked.

We'll go through each of these in detail.

Resolving RPM Dependencies. When doing manual RPM installations, you may have to make several passes. This occurs when the package you're trying to install depends on a package that is missing or out of date. The installation step breaks down into a series of attempts to locate and install the needed packages.

  1. First, attempt to install the package. If all of the foundation is in place, this will work, and you'll be finished. If you don't have the complete foundation in place, you'll get messages telling you what's missing or out-of-date.

  2. If RPM reports any missing or wrong version packages, you must freshen or install the missing packages. This will build the proper foundation. Note that foundations have sub-foundations, and sub-foundations have sub-sub-foundations. This process can go pretty deep, so keep notes on where you are in the process.

    1. Search for the missing our out of date RPM.
    2. Freshen or Install the missing package. This may lead to a search for additional packages.
  3. Finally, finish installing the package you started out trying to install. Ideally, you took a detour and installed everything on which this package depends, so the second time around it should install. If the package doesn't install, you'll be back at step 2 with a different list of foundational components to put in place.

RPM Pre-Installation

Before installing software, back up your computer.

You should also have a directory for saving your downloads. I recommend that you create a /opt directory for these kinds of options which are above and beyond the basic Linx installation. You can keep all of your various downloaded tools and utilities in this directory for two reasons. If you need to reinstall your software, you know exactly what you downloaded. When you get a new computer (or an additional computer), you know what needs to be installed on that computer.

RPM Installation

A typical scenario for installing Python is a command like the following. This has specific file names for Fedora Core 9. You'll need to locate appropriate RPM's for your distribution of Linux.

rpm -i https://download.fedora.redhat.com/pub/fedora/linux/development\
/i386/os/Packages/python-2.5.1-18.fc9.i386.rpm

Often, that's all there is to it. In some cases, you'll get warnings about the DSA signature. These are expected, since we didn't tell RPM the public key that was used to sign the packages.

RPM Post-Installation

Testing

Run the Terminal tool. At the command line prompt, enter env python, and see what happens. Generally, we should be able to simply enter python and run the python environment.

[slott@linux01 ~]$ python
Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) 
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

If you hit Ctrl-D (the GNU/Linux end-of-file character), Python will exit. The basic Python program works.


 
 
  Published under the terms of the Open Publication License Design by Interspire