LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Upgrading Python to newer version (http://www.linuxquestions.org/questions/linux-software-2/upgrading-python-to-newer-version-147160/)

dopper 02-17-2004 09:18 AM

Upgrading Python to newer version
 
Currently I am running Python version 1.5.2 found at /usr/bin/python, Python version 2.2.2 found at /usr/bin/python2, Python version 2.2.2 found at /usr/bin/python2.2 on a mitel SME Server version 6.0 (www.e-smith.org ) which is based on redhat 7.3.

My goal is to have Python 2.3.2 or later installed somewhere in the system PATH to meet the (plone 2.0 CMS ) system requirements.

There are rpm builds of python for fedora core 1 available here but I'm not sure if they're compatible with redhat 7.3/SME server.

I tried installing the newest version of python from source tarball to see if that would work but I got the following error:
Code:

./configure
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... no
checking for --with-cxx=<compiler>... no
checking for c++... no
checking for g++... no
checking for gcc... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

What's the easiest way for me to upgrade my python libraries? I consider myself beginner level.

dopper 02-17-2004 09:30 AM

compiling is out of the question since I just read this on the sme server FAQ's
 
I can't seem to find make, gcc or other compiler tools?

The SME Server is not a general purpose Linux operating system - it's a specialized distribution designed to act as a workgroup server and internet gateway. We do not provide compiler tools, including "make" as they are not required for the operation of the system and should not be installed on production gateways in order to preserve the integrity and security of the system.

A system running RedHat linux (or compatible) should be used for preparing any software for installation onto the server. Preferably the RPM binary format should be used to package the software and install it on the server. Please see Questions 5 and 6 for more details.

Please note that you can still develop RPMS on your SME Server without these tools.

dopper 02-17-2004 12:28 PM

I'm grabbing at straws here but...
 
This is the method I decided to try to upgrade my python libraries on SME 6.0 to the newest version

----------taken from http://www.python.org/2.3.3/rpms.html-----------
RPMs For Other Platforms
For platforms in which binaries aren't available here, you can easily build binary RPMs directly from the Python SRPM. Simply download one of the .src.rpm files below, and run "rpmbuild --rebuild python-<version>.src.rpm". Note toward the end of the output, the lines starting with "Wrote:" indicate where the binary RPMs were written.

The benefit of building binary RPMs in this way is that they are built using exactly the set of libraries and versions of packages that you have installed on your system. Because the SRPMs encompass all the steps required to build binary RPMs, it is a "fire and forget" process -- the simplest source build ever.
--------------------------------------------------------------------------------------

1) downloaded python2.3-2.3.3-2pydotorg.src.rpm and tried the suggestion above to build my own binary rpm directly from the python source rpm. I got an error because of failed dependancies and because I was also missing gcc or other tools to compile
2) I did Fresh installation of sme 6.0 on a seperate machine to try and create the binary rpm for my SME Server.
3) I downloaded all the necessary package dependancies and necessary files
needed to compile programs in sme 6.0 and to create a python rpmbuild
--rebuild for the python source rpm including all the following files:
cpp-2.96-98.i386.rpm
db4-4.0.14-14.i386.rpm
db4-devel-4.0.14-14.i386.rpm
expat-devel-1.95.2-2.i386.rpm
gcc-2.96-98.i386.rpm
gdbm-devel-1.8.0-14.i386.rpm
glibc-2.2.5-43.i386.rpm
glibc-common-2.2.5-43.i386.rpm
glibc-devel-2.2.5-43.i386.rpm
kernel-headers-2.2.19-7.0.8.noarch.rpm
python2.3-2.3.3-2pydotorg.src.rpm
4) Once everything was installed that I believed was necessary to create the binary RPM from the python RPM source I tried it again
Code:

# rpmbuild --rebuild python2.3-2.3.3-2pydotorg.src.rpm
Now I'm running into the following error. Any ideas what this error means? Here's the config.log file:

Code:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by python configure 2.3, which was
generated by GNU Autoconf 2.57.  Invocation command line was

  $ ./configure --enable-unicode=ucs4 --disable-ipv6 --with-pymalloc --prefix=/usr

## --------- ##
## Platform. ##
## --------- ##

hostname = virtualsme6
uname -m = i686
uname -r = 2.4.20-18.7
uname -s = Linux
uname -v = #1 Thu May 29 06:51:53 EDT 2003

/usr/bin/uname -p = unknown
/bin/uname -X    = unknown

/bin/arch              = i686
/usr/bin/arch -k      = unknown
/usr/convex/getsysinfo = unknown
hostinfo              = unknown
/bin/machine          = unknown
/usr/bin/oslevel      = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1402: checking MACHDEP
configure:1510: result: linux2
configure:1516: checking EXTRAPLATDIR
configure:1531: result:
configure:1544: checking for --without-gcc
configure:1593: result: no
configure:1599: checking for --with-cxx=<compiler>
configure:1620: result: no
configure:1639: checking for c++
configure:1668: result: no
configure:1639: checking for g++
configure:1668: result: no
configure:1639: checking for gcc
configure:1655: found /usr/bin/gcc
configure:1665: result: gcc
configure:1706: checking for C++ compiler default output
configure:1709: gcc    conftest.cc  >&5
gcc: installation problem, cannot exec `cc1plus': No such file or directory
configure:1712: $? = 1
configure: failed program was:
| #line 1685 "configure"
| /* confdefs.h.  */
|
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _XOPEN_SOURCE 600
| #define _XOPEN_SOURCE_EXTENDED 1
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|  ;
|  return 0;
| }
configure:1751: error: C++ compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_CXX=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
BASECFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC=''
CCSHARED=''
CFLAGS=''
CFLAGSFORSHARED=''
CONFIG_ARGS=''--enable-unicode=ucs4' '--disable-ipv6' '--with-pymalloc' '--prefix=/usr''
CPP=''
CPPFLAGS=''
CXX='gcc'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRAMACHDEPPATH=''
EXTRAPLATDIR=''
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDFLAGS=''
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LN=''
LTLIBOBJS=''
MACHDEP='linux2'
MACHDEP_OBJS=''
MAINOBJ='python.o'
OBJEXT=''
OPT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.3'
PACKAGE_TARNAME='python'
PACKAGE_VERSION='2.3'
PATH_SEPARATOR=':'
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
RANLIB=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.3'
ac_ct_CC=''
ac_ct_RANLIB=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${prefix}/share'
exec_prefix='NONE'
host_alias=''
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/usr'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600
#define _XOPEN_SOURCE_EXTENDED 1
#define __BSD_VISIBLE 1

configure: exit 77


dopper 02-19-2004 12:10 PM

update
 
Someone has pointed me to some redhat 7.3 rpm updates for python that will save me the trouble of building my own RPM's.

here's a link to the rpm to update the python packages

here's the helpful post


All times are GMT -5. The time now is 10:52 PM.