Operating System - HP-UX
1823761 Members
4460 Online
109664 Solutions
New Discussion юеВ

How can remove particular version of perl i have two versions installed 5.8.8. and 5.34.1

 
SOLVED
Go to solution
satha
Occasional Contributor

How can remove particular version of perl i have two versions installed 5.8.8. and 5.34.1

I have two Perl versions installed

perl E.5.8.8.O Perl Programming Language
perl 5.34.1 perl

My server is point to 5.34.1 i need it to point to 5.8.8.0

perl -v

This is perl 5, version 34, subversion 1 (v5.34.1) built for IA64.ARCHREV_0-LP64

Copyright 1987-2022, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

I tried removing the new version using swremove command but i had error
swremove perl

======= 12/07/22 11:23:10 SST BEGIN swremove SESSION
(non-interactive) (jobid=s74u0021g-0348)

* Session started for user "root@xxxxxg".

* Beginning Selection
* Target connection succeeded for "root@xxxxxg:/".
ERROR: Could not apply the software selection "perl" because multiple
product variations are available from the source that would be
compatible with the destination host(s). To uniquely identify
the desired product variation, include revision, architecture,
location or vendor information in the software selection.
* Software selection failed for "root@xxxxxg:/".
ERROR: Cannot continue the "swremove" task.
* Selection had errors.

 

======= 12/07/22 11:23:11 SST END swremove S

 

 

10 REPLIES 10

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

Well you just need to tell swremove which release of perl you want to remove, so:

swremove perl,r=5.3.4.1

should do the trick

Although I wonder why you don't just play with your PATH environment variable to remove the location of the older version from your search path (and you may possibly need to add the newer version in as well if it isn't already on there).


I am an HPE Employee
Accept or Kudo
Patrick Wallek
Honored Contributor

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

The other issue you may have when attempting to remove PERL is applications that depend on it.  There may be A LOT of HP-UX that depend on one, or both, versions of PERL.

 

Here is output from the 'swjob' command of an swremove I ran on one of my test systems to remove PERL.

# swlist | grep -i perl
perl E.5.8.8.M Perl Programming Language
perl 5.10.1 perl


# swremove perl,r=E.5.8.8.M

======= 12/09/22 09:22:42 CST BEGIN swremove SESSION
(non-interactive) (jobid=atl6-5537)

* Session started for user "root@atl6".

* Beginning Selection
* Target connection succeeded for "atl6:/".
* Software selections:
perl,r=E.5.8.8.M,a=HP-UX_B.11.31_IA/PA,v=HP
Perl5-32.PERL-MAN,l=/opt/perl,r=E.5.8.8.M,a=HP-UX_B.11.31_IA/PA,v=HP,fr=E.5.8.8.M,fa=HP-UX_B.11.31_IA
Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M,a=HP-UX_B.11.31_IA/PA,v=HP,fr=E.5.8.8.M,fa=HP-UX_B.11.31_IA
Perl5-64.PERL-MAN,l=/opt/perl_64,r=E.5.8.8.M,a=HP-UX_B.11.31_IA/PA,v=HP,fr=E.5.8.8.M,fa=HP-UX_B.11.31_IA
Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M,a=HP-UX_B.11.31_IA/PA,v=HP,fr=E.5.8.8.M,fa=HP-UX_B.11.31_IA
* Selection succeeded.


* Beginning Analysis
* Session selections have been saved in the file
"/root/.sw/sessions/swremove.last".
ERROR: "atl6:/": The software dependencies for 2 products or
filesets cannot be resolved.
* "atl6:/": 1 bundles cannot be removed because not all of
their filesets can be removed.
* The analysis phase failed for "atl6:/".
* Analysis had errors.


* Beginning Execution
ERROR: "atl6:/": 3 software objects were determined to be skipped in
the analysis phase.
* The execution phase failed for "atl6:/".
* Execution had errors.


ERROR: More information may be found in the agent logfile using the
command "swjob -a log atl6-5537 @ atl6:/".

 

 

# swjob -a log atl6-5537 @ atl6:/
======= 12/09/22 09:22:43 CST BEGIN remove AGENT SESSION (pid=25719)
(jobid=atl6-5537)

* Agent session started for user "root@atl6". (pid=25719)

* Beginning Analysis Phase.
* Target: atl6:/
* Target logfile: atl6:/var/adm/sw/swagent.log
* Reading source for file information.
* The fileset "Bastille.BASTILLE,l=/,r=B.3.3.01" requires the
selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "Bastille.BASTILLE-AUX,l=/,r=B.3.3.01" requires
the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "SecurityTools.TOOLSFILESET,l=/,r=B.01.04.10"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-UTIL-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-UTIL2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-CEXEC-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-CEXEC2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-CLOG-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-CLOG2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-CSYNC-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
* The fileset "DSAU.DSAU-CSYNC2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" as a
corequisite.
ERROR: The dependencies for fileset
"Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M" cannot be
resolved (see previous lines).
You must resolve the above dependencies before operating on
this fileset or change the "enforce_dependencies" option to
"false".
* The fileset "DSAU.DSAU-UTIL-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-UTIL2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-CEXEC-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-CEXEC2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-CLOG-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-CLOG2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-CSYNC-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "DSAU.DSAU-CSYNC2-RUN,l=/opt/dsau,r=C.01.00.22"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "HP9000Containers.HP9KC-TOOLS,l=/,r=A.03.01.04"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "HP9000Containers.HP9KC-GUI,l=/,r=A.03.01.04"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset "HP9000Containers.HP9KC-MAN,l=/,r=A.03.01.04"
requires the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
* The fileset
"HP9000Containers.HP9KC-TEMPLATES,l=/,r=A.03.01.04" requires
the selected fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" as a corequisite.
ERROR: The dependencies for fileset
"Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M" cannot be resolved
(see previous lines).
You must resolve the above dependencies before operating on
this fileset or change the "enforce_dependencies" option to
"false".
NOTE: Could not remove the bundle "perl,l=/,r=E.5.8.8.M" because not
all of its filesets could be removed.

* Summary of Analysis Phase:
ERROR: Exclude Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M
ERROR: Exclude Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M
ERROR: 2 of 4 filesets had Errors.
* 2 of 4 filesets had no Errors or Warnings.
ERROR: The Analysis Phase had errors. See the above output for
details.


* Beginning the Unconfigure Execution Phase.
* Filesets: 2
* Files: 4884
* Kbytes: 68557

* Beginning the Remove Execution Phase.
* Removing fileset
"Perl5-64.PERL-MAN,l=/opt/perl_64,r=E.5.8.8.M" (1 of 2).
* Removing fileset "Perl5-32.PERL-MAN,l=/opt/perl,r=E.5.8.8.M"
(2 of 2).

* Summary of Execution Phase:
ERROR: Skipped (in analysis) Perl5-64.PERL-RUN,l=/opt/perl_64,r=E.5.8.8.M
ERROR: Skipped (in analysis) Perl5-32.PERL-RUN,l=/opt/perl,r=E.5.8.8.M
ERROR: 2 of 4 filesets had Errors.
* 2 of 4 filesets had no Errors or Warnings.
ERROR: The Execution Phase had errors. See the above output for
details.


======= 12/09/22 09:23:16 CST END remove AGENT SESSION (pid=25719)

georgek_1
HPE Pro

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

Hello Patrick Wallek,

 

As the error shows , multiple software such as HP9000Containers,DSAU.,Bastille installed  in server depends on Perl software you are trying to remove. You may forcefully remove perl using the option -x enforce_dependencies=false, but it may affect the functionality of other software mentioned above .

 

I work for HPE/ I am an HPE Employee (HPE Community)



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Patrick Wallek
Honored Contributor

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

Yes, I am aware of all of that.  That is the point I was trying to make to the OP.   If Java is removed it may affect other things on the system.

satha
Occasional Contributor

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

swremove perl,r=5.3.4.1

======= 12/15/22 15:13:33 SST BEGIN swremove SESSION
(non-interactive) (jobid=sXXXXX-0349)

* Session started for user "root@sXXXXXg".

* Beginning Selection
* Target connection succeeded for "sXXXXX:/".
ERROR: Could not remove the software selection "perl,r=5.3.4.1"; it
is not available from depot or root "sXXXXX:/".
* Software selection failed for "sXXXXX:/".
ERROR: Cannot continue the "swremove" task.
* Selection had errors.

 

======= 12/15/22 15:13:34 SST END swremove SESSION (non-interactive)
(jobid=sXXXXX-0349)

 

georgek_1
HPE Pro

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

Hello satha,

 

The message you have tells that the software is not available for removal .

Please run swlist and confirm if you have software showing .

 

I work for HPE/ I am an HPE Employee (HPE Community)



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
satha
Occasional Contributor

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

sxxxxxg:home/sathavai $ whoami
root
sxxxxxg:home/sathavai $ swremove perl,r=5.34.1

======= 12/15/22 19:29:29 SST BEGIN swremove SESSION
(non-interactive) (jobid=sxxxxxg-0320)

* Session started for user "root@sxxxxxg".

* Beginning Selection
* Target connection succeeded for "sxxxxxg:/".
ERROR: Could not remove the software selection "perl,r=5.34.1"; it is
not available from depot or root "sxxxxxg:/".
* Software selection failed for "sxxxxxg:/".
ERROR: Cannot continue the "swremove" task.
* Selection had errors.

 

======= 12/15/22 19:29:31 SST END swremove SESSION (non-interactive)
(jobid=sxxxxxg-0320)

sxxxxxg:home/sathavai $ perl -v

This is perl 5, version 34, subversion 1 (v5.34.1) built for IA64.ARCHREV_0-LP64

Copyright 1987-2022, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

sxxxxxg:home/sathavai $ swlist |grep -i perl
perl E.5.8.8.O Perl Programming Language
sxxxxxg:home/sathavai $s74u0022g:home/sathavai $ which perl
/usr/bin/perl

georgek_1
HPE Pro

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

Hello satha,

 

As per swlist, the version available is E.5.8.8.O, , but perl -v showing otherwise .

$ perl -v

This is perl 5, version 34, subversion 1 (v5.34.1)

 

Swremove complaining that version 5.34.1 is not available for removal .

 

Have you removed perl version 5.34.1 earlier , which may be un-successful ?

 

You need to go through swagent.log and confirm the steps taken already .

 

I work for HPE/ I am an HPE Employee (HPE Community)



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
satha
Occasional Contributor
Solution

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

@georgek_1 

I removed using the below  command 

 

swremove perl,r=5.34.1

 

  after that, I ran swlist and it was showing only E.5.8.8.O, but when I check for the version using Perl -v it is again showing 5.34.1

 

georgek_1
HPE Pro

Re: How can remove particular version of perl i have two versions installed 5.8.8. and 5.

Hello Satha,

 

As mentioned , you need to check swagent.log carefully and see why the OLD perl version is showing though you have removed the version using r= with swremove .

 

I work for HPE/ I am an HPE Employee (HPE Community)

 



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo