1827800 Members
2907 Online
109969 Solutions
New Discussion

SWINSTALL error

 
SOLVED
Go to solution
Jasdeep Singh
New Member

SWINSTALL error

Hi,
I need to install the command 'lsof' on a non-production server in the directory /usr/sbin.
I had copied the file 'lsof-4.80-hppa-11.11.depot.gz'in the /tmp dirctory, then I unzipped it with the command:
gzip lsof-4.80-hppa-11.11.depot.gz
after that I ran the command below and got the following output:
**********************************************
# swinstall -s /tmp/lsof-4.80-hppa-11.11.depot "*" @ /usr/sbin

======= 09/19/08 21:12:46 EST BEGIN swinstall SESSION
(non-interactive) (jobid=mlbs0036-0163)

* Session started for user "root@mlbs0036".

* Beginning Selection
* Target connection succeeded for "mlbs0036:/usr/sbin".
* Source: /tmp/lsof-4.80-hppa-11.11.depot
* Targets: mlbs0036:/usr/sbin
* Software selections:
lsof.lsof-RUN,r=4.80,a=HP-UX_B./800
* Selection succeeded.


* Beginning Analysis and Execution
* Session selections have been saved in the file
"/.sw/sessions/swinstall.last".
* The analysis phase succeeded for "mlbs0036:/usr/sbin".
WARNING: "mlbs0036:/usr/sbin": 1 postinstall or postremove scripts had
warnings.
* Analysis and Execution succeeded.


NOTE: More information may be found in the agent logfile using the
command "swjob -a log mlbs0036-0163 @ mlbs0036:/usr/sbin".

======= 09/19/08 21:12:55 EST END swinstall SESSION (non-interactive)
(jobid=mlbs0036-0163)
***********************************************
The command doesn't run nor can it be found by running 'which lsof'.But, I can see it after running the 'swlist' command.
Can anybody please help me, that in what status is the installation and what needs to be done to install the command correctly and how to make it operative from the path /usr/sbin.

Thanks in advance.....
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: SWINSTALL error

lsof is normally installed in /usr/local/bin.

The easiest way to make it accessable from /usr/sbin/ is to let it install normally and then create a link from /usr/sbin/lsof to /usr/local/bin/lsof.

What you may find is that the command was installed in /usr/sbin/usr/local/bin/lsof. It may have just created its whole install patch under /usr/sbin/.

James R. Ferguson
Acclaimed Contributor
Solution

Re: SWINSTALL error

Hi:

SOftware from the HP-UX Porting Center is setup to install in '/usr/local/bin' by default. You should have:

# whereis lsof
lsof: /usr/local/bin/lsof /usr/local/man/man8/lsof.8

Hence, either add '/usr/local/bin' to your ${PATH} or uee the absolute path to run:

# /usr/local/bin/lsof

Regards!

...JRF...
Jasdeep Singh
New Member

Re: SWINSTALL error

Patrick,

When I run the command 'lsof', I get the error message :
*********************
sh: lsof: not found.
*********************
but, when enter '/usr/local/bin/lsof' the command runs.
James,

The location of the file is:
********************************************
# whereis lsof
lsof: /usr/local/bin/lsof /usr/local/man/man8/lsof.8
********************************************
Could you kindly explain why isn't the command running successfully by just 'lsof'.

Thanks again....
Sandeep_Chaudhary
Trusted Contributor

Re: SWINSTALL error

simple :


add /usr/local/bin/ this path to /etc/PATH file

and run this command from ur shell
export PATH=$PATH:/usr/local/bin/


why u want to create link? Any requiremnet
James R. Ferguson
Acclaimed Contributor

Re: SWINSTALL error

Hi (again):

> When I run the command 'lsof', I get the error message :
sh: lsof: not found.

This is expected. Either:

(1) DO: cd /usr/local/bin && ./lsof

(2) Use the absolute path: /usr/local/bin/lsof

Normally '/usr/local/bin' isn't part of your path. To add this to the PATH (as defined in the root 'profile' is a dangerous security hole.

In fact, examine '/usr/newconfig/.profile' to see how a safe PATH for root is setup by default.

Regards!

...JRF...
Tim Nelson
Honored Contributor

Re: SWINSTALL error

Just wanted to second JRF's WARNING.

I you include /usr/local/bin in root's path please please please restrict and protect everything in /usr/local/* By default /usr/local/* has wide open permissions ( BAD ).

This is almost as bad as including "." in root's PATH.

Jasdeep Singh
New Member

Re: SWINSTALL error

James, when I created a link of /usr/local/bin/lsof* in the recommended /usr/sbin, the command lsof was running fine and without bugs.

Thank You all for your support