Dear Henrik
It is working....thanks a lot! I had actually previously
tried this: sudo yum install netstat rather than sudo yum install net-tools
By the by, what advantages does port4me have as compared to netstat?
THanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: Henrik Bengtsson <henrik.bengtsson at gmail.com>
Sent: Wednesday, December 7, 2022 12:19 AM
To: akshay kulkarni <akshay_e4 at hotmail.com>
Cc: R help Mailing list <r-help at r-project.org>
Subject: Re: [R] netstat in R in linux...
Okay,
that means that the Linux machine where you run this on does not have
the 'netstat' software installed. That is something that needs to be
installed outside of R. For example, if it's Ubuntu, I think 'sudo
apt info net-tools' will do.
(Disclaimer: I'm the author)
A cross-platform alternative to netstat::free_port(), is
port4me::port4me(), which is also available from CRAN
(https://cran.r-project.org/package=port4me). It requires no external
tools, but R (>= 4.0.0).
/Henrik
On Tue, Dec 6, 2022 at 10:41 AM akshay kulkarni <akshay_e4 at hotmail.com>
wrote:>
> Dear Henrik,
> The error is:
>
> > library(netstat)
> > free_port()
> sh: netstat: command not found
> Error in system("netstat -n -a", intern = TRUE) :
> error in running command
>
> Thanking you,
> Yours sincerely
> AKSHAY M KULKARNI
> ________________________________
> From: Henrik Bengtsson <henrik.bengtsson at gmail.com>
> Sent: Tuesday, December 6, 2022 11:53 PM
> To: akshay kulkarni <akshay_e4 at hotmail.com>
> Cc: R help Mailing list <r-help at r-project.org>
> Subject: Re: [R] netstat in R in linux...
>
> What's the error?!?
>
> /Henrik
>
> On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni <akshay_e4 at
hotmail.com> wrote:
> >
> > dear members,
> >
> > I am using free_port() in netstat package in R. It is working in
windows but not in linux. It is throwing an error in linux. ANy help please?
> >
> > THanking you,
> > Yours sincerely
> > AKSHAY M KULKARNI
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]