How do You manage different program versions?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do You manage different program versions?
# 1  
Old 01-31-2015
Wrench How do You manage different program versions?

Hallo,
I have an general question which happens when installing software by compiling them self. I'm using FreeBSD system 10.0 and the ports. for info, see: http--en.wikipedia.org/wiki/FreeBSD_Ports.
As I installed BSD for some years there was (i.e.) perl-14 installed. Now, when doing some upgrades, perl-16 is needed by some ports. The problem is: some other older programs, that are still installed, require perl-14 when I do a update.

Can I general have perl-14 and perl-16 installed at the same time on a Unix machine?

And if yes - what is when a program compilation just only recommend "perl" and can not find the right version?

When no - how can I compile the older programs when there are no upgrades it?

I get the same problem i.e. with python27 and python24. How is it managed in general under UNIX that programs can compile when they needed different version of other programs (such like perl, python) or libraries?

(to explain: I understand updating as installing error fixes and upgrading as install a new version of a program)
# 2  
Old 01-31-2015
I am not a specialist for FreeBSD, so my advice will be generic. It may well be that FreeBSD has some special provisions for some of the things mentioned, but what i am going to suggest should work on every UNIX- and UNIX-like system.

One possibility is to create different directories for different versions,then create a link for the default version: instead of installing a software to, say, /opt/software you install version 1 to /opt/software-v1, version 2 to /opt/software-v2, then create a link /opt/software -> /opt/sofware-v2, which will make version 2 accessible through /opt/software (which is probably the default path for it) as well. Instead of reinstalling over and over again you just recreate the link if the necessity arises.

You might even create the link prior to installation of the software so that you can use normal installation routines (which most times uses a fixed path) and still have different directories for the different versions.

Another option is to control different software versions through the envrionment: binaries are searched for in the order in which the directories appear in the PATH.

For example: you have a binary "mybinary" installed in /opt/software-v1/bin and in another version in /opt/software-v2/bin. If your path looks like:

Code:
PATH="$PATH:/opt/software/v1/bin

Then every time you enter "mybinary" without an explicit path version 1 would get executed, Would it be:

Code:
PATH="$PATH:/opt/software/v2/bin

instead, version 2 would be executed by default.

It is, btw., the same with other environment variables which accept a list of directories, like the ksh-specific "FPATH" for instance.

Finally, this is a variation on this method, you can create different users, one with an environment pointing to one version, the other pointing to the other.

I hope this helps.

bakunin

Last edited by Don Cragun; 01-31-2015 at 07:07 PM.. Reason: Fix a couple of ICODE tags.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to manage parameter in alias?

I make alias in bashrc file and typed it on prompt, alias tes='echo "$1"xx"$2"xxx"$3"xxxx' $ tes a b c xxxxxxxxx a b c what's happened to the shell here ?, and also, alias tes='echo "$3"xx"$2"xxx"$1"xxxx $ tes a b c xxxxxxxxx a b c anyone sincerely is to help me.. (2 Replies)
Discussion started by: abdulbadii
2 Replies

2. UNIX for Dummies Questions & Answers

Thrown in position, need to manage AIX 5.3

Hey Everyone, First post and I'm coming here for help. Basically, the company I work for has been put in a weird situation with staff turnover. I used to manage an application on our IBM p5 running AIX 5.3, but I am now managing the whole server itself. I have no experience, no box to test... (1 Reply)
Discussion started by: pvpkife
1 Replies

3. Shell Programming and Scripting

How to manage several versions of Perl modules during the install?

Hello, I would really appreciate any advice on this issue: My Perl Module Environment: /usr/lpp/perl/lib/5.8.7 => has the Perl modules that come with the base Perl installation. Comes first in @INC concatination. /usr/lpp/perl/lib/site_perl/5.8.7 => has all my installed Perl modules... (1 Reply)
Discussion started by: genya01
1 Replies

4. Shell Programming and Scripting

manage function's output

Hi all, how i can get an calculated value from a function for exemple my function is like function getMyPseudo { .. .. echo "Rambler" } i need to put the printed string into a variable sommeting like : MYPSEUDO=getMyPseudo print $MYPSEUDO in that case, the out put i... (3 Replies)
Discussion started by: rambler
3 Replies

5. UNIX for Dummies Questions & Answers

Manage Mail

I have recently taken over a UNIX system from another programmer and am just beginning to learn UNIX. When I enter the MAIL command, the data scrolls off the screen for five minutes. Some of it is several years old. Can I tell the MAIL command to give me the last few items or the last few... (1 Reply)
Discussion started by: SUSANR9999
1 Replies

6. Programming

Executing an .ec program in different informix versions

Hi all, I tried writing an .ec program connecting to informix database from solaris platform Sun 5.7 informix version that i had to used when i compiled the program was 9.21.UC3 the binary when i ported solaris box with informix version 9.40.UC5 i am unable to run that i am encountering... (0 Replies)
Discussion started by: matrixmadhan
0 Replies

7. Shell Programming and Scripting

How to manage multiple versions of a set of shell and SQL script utilities

Hi all --- I have the need to manage multiple versions of a set of utility scripts -- both shell and SQL and other .dat files. I am wondering if anyone out there knows of a good way to "PATH" to SQL and text files in a way similar to how PATH facilitates finding executables in a pre-specified... (2 Replies)
Discussion started by: DennisB
2 Replies

8. UNIX for Dummies Questions & Answers

manage the wtmp file

Here's a usefull perl script to trim the wtmp file, in case it got too big, which happens sometimes, or got curropted (which also happens often). You could learn from here how to parse the wtmp file... but of course for just reading its content always simply use "last" like Neo said.... ... (0 Replies)
Discussion started by: me2unix
0 Replies
Login or Register to Ask a Question