LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2007, 10:23 AM   #1
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Rep: Reputation: 15
How to make Linux acknowledge new versions of programs


I'm sure this is a basic Linux command, but I'm not sure how to do this. Here is my situation:

I just downloaded a new version of ip-sec tools. RHEL4 already has 0.3.3 loaded on it but I need to tell it to use my version by default. For example, 'setkey' can be entered in terminal but ip-sec tools v 0.3.3 runs it, not my new 0.6.6v. I simply untarred the new version and ran the configure script. What else do I need to do?
 
Old 01-16-2007, 11:22 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If you're using RHEL4, try to find an .rpm package of the program you're trying to install; this is the easiest method. If you have a .tar file, it means you probably have the source code which you need to compile yourself; this is pretty easy in most cases (not always), but it has a drawback: if your system has an automatic update tool like up2date or yum, you can't upgrade your program with it unless it's installed as rpm, since the automatic package managers/update programs are based on rpm packages on RHEL.

Anyway, if you DO want to update your program (or do you want to keep the old one too? If you do want to keep them both, you don't remove the older one first, and when compiling the new, you need to use a different prefix to not overwrite files; the prefix depends on your system, default prefix depends on the program), you'll need to

1) remove the older version, if you don't need it anymore: if it was installed using rpm or yum or equivalent (i.e. not compiled),
Code:
rpm -e ip-sec
if the package is called ip-sec-versionnumber. After this you would run the configure script in the directory of the source code of the new program, which you already did (did it succeed? if you got errors, you need to fix them first and run configure again until it does succeed -- this is vital, as configure determines if your system has everything needed in place).

2) after configuration, compile the program (this is in the same directory you ran configure in):
Code:
make
Again, this must succeed without errors. If errors pop up, fix them first, then re-run.

3) once both configure and make have succeeded (provided that this is the way you install this software; there are many ways, the correct way is found in INSTALL and/or README files usually found inside the directory), you can then install the program which means copying the compiled files into their place in the system:
Code:
su
give root password
make install
Note that this method varies, and to find out if you really do it like this you need to read the README and/or INSTALL files along with other documentation that came along with the source code. It's often easier, for upgrading and making sure dependencies etc. are met, to use an rpm package (in this case).
 
Old 01-16-2007, 11:41 AM   #3
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
I always find it easier to build the binary rpm packages myself;

http://download.fedora.redhat.com/pu....6.5-6.src.rpm

rpmbuild --rebuild --recompile ipsec-tools-0.6.5-6.src.rpm

Follow the ouptut to install the binary package, remember you do not need the debuginfo package installed. From the spec file the change log shows;

%changelog
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 0.6.5-6
- rebuilt for unwind info generation, broken in gcc-4.1.1-21

* Mon Sep 25 2006 Harald Hoyer <harald@redhat.com> - 0.6.5-5
- added patch for selinux integration (bug #207159)

* Fri Aug 4 2006 Harald Hoyer <harald@redhat.com> - 0.6.5-4
- backport of important 0.6.6 fixes:
- sets NAT-T ports to 0 if no NAT encapsulation
- fixed memory leak

The build requirements are yours to satisfy;

BuildRequires: openssl-devel, krb5-devel, bison, flex, automake, libtool
BuildRequires: libselinux-devel >= 1.30.28-2
Requires: initscripts >= 7.31.11.EL-1

Change the libselinux-devel requirement to 1.19.1-7.2
 
Old 01-16-2007, 02:03 PM   #4
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Original Poster
Rep: Reputation: 15
Thanks a lot guys. I'm good to go now. I appreciate the complete explanations of why I should use each command. Thanks!
 
Old 01-24-2007, 08:25 AM   #5
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Original Poster
Rep: Reputation: 15
If I remove the first version of ipsec tools it removes my IPSEC tab in the network-config. How can I install a newer version and keep my old one, but tell linux to use my new version?
 
Old 01-24-2007, 09:05 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
This is why using updated rpm packages is better choice with rpm based versions of Linux, after building the new version from where the binary rpm package is located;

rpm -Uvh ipsec-tools-0.6.5-6*.rpm
 
Old 01-24-2007, 06:11 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,518

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Not to get too technical here, but one of the unique things about Linux is that you can have more than one version of an application, and more than one version of a system library, installed on your computer at the very same time.

Unlike Windows, Linux clearly supports the notion of library versions. If you take a quick peek, say in the /lib directory of your machine, you'll see what I mean. For each library listed here, you'll see one or more numbered libraries, and a few "symbolic links" (basically, shortcuts) referring to one of them. For example, picking one arbitrary set from my system:
Code:
 /lib/libncurses.so -> libncurses.so.5
 /lib/libncurses.so.5 -> libncurses.so.5.5
 /lib/libncurses.so.5.5
When an application needs to load libncurses, it can now be just as specific or as generic as it wishes to be. If it wants "version 5.5," it'll get that. If it wants "version 5.x," fine. And if it simply wants "libncurses," asking thereby for the latest or the default one, fine.

There's an obscure little command called /sbin/ldconfig that you may have never heard of, or that you've simply never seen running. This command rebuilds a "cache" that the loader uses to find libraries more quickly. If you change the libraries, root needs to run this program to rebuild this cache.

As for applications, Linux (like Windows) uses the notion of a path. If the exact location of the file to be run is not specified, Linux searches down the path from front to back, always running the first one it finds.

If you want to know which file the path-search would run, but without running it, then the which command will do that, e.g.: which setkey

Unlike Windows, the current-directory (".") is not on the default path ($PATH). Therefore if you want to run a program located in your current directory, you must specify that it's in the current directory: "./programname ..." ("." refers to "the current directory," and "/" is the usual Linux/Unix directory-name separator.)

---
"So there! Nothin' to it. Five cents, please."

Last edited by sundialsvcs; 01-24-2007 at 06:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will you ebay sellers please acknowledge Barry? darinbolson Puppy 27 10-19-2006 06:40 PM
How do you make programs in linux? radar5000 Programming 8 10-19-2006 12:39 AM
amd64 vs IA32 linux versions: can programs be incompatible bobo333 Linux - Newbie 1 08-27-2006 02:10 PM
Trouble with the automatic updates (duplicate versions of various programs) Luythen Red Hat 1 10-05-2004 07:38 AM
C++ and OpenGL- how to make programs/games compatible with both windows and linux uveraser Programming 9 06-16-2004 03:38 PM


All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration