LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nnetstat (https://www.linuxquestions.org/questions/linux-software-2/nnetstat-93229/)

mercutio 09-15-2003 09:52 PM

Nnetstat
 
when i try to run Nnetstat.pl i am getting this error:

[1] 18898
bash: ./Nnetstat.pl: Permission denied

i don't understand why this is. i checked perl it's in /usr/bin/perl and i quess this is where the Nnetstat. pl file is looking. the command that i am typing is ./Nnetstat.pl &. does anyone know why i am getting this permission denied error (i tried running as root and regular user)?

thanks

m

jalal 09-16-2003 06:41 AM

is it executable ?

if it runs fine with "perl Nnetstat.pl", then it might be a matter of making the file excutable.

You'll also need to add "#!/usr/bin/perl" at the top of the script.

mercutio 09-17-2003 09:17 PM

If i try to run with "perl Nnetstat.pl" i get this error:

Can't open perl script "Nnetstat.pl": No such file or directory

this is running as root. i'm not sure what you mean exactly by this:

#!/usr/bin/perl

if i am running as a user should i put the user name where the "!" is? and do i put the "#" sign in? sorry if these are ridiculous questions, but i'm pretty new at this.

thanks a lot,

m

MiscGeek 09-17-2003 09:54 PM

Quote:

Originally posted by mercutio
If i try to run with "perl Nnetstat.pl" i get this error:

Can't open perl script "Nnetstat.pl": No such file or directory

this is running as root. i'm not sure what you mean exactly by this:

#!/usr/bin/perl

if i am running as a user should i put the user name where the "!" is? and do i put the "#" sign in? sorry if these are ridiculous questions, but i'm pretty new at this.

thanks a lot,

m

If the file Nnetstat.pl is in your current directory try "perl ./Nnetstat.pl".

The #!/usr/bin/perl needs to be the first line in your Nnetstat.pl file. This is if you want to run it without having to use "perl <filename>".

Mike

mercutio 09-18-2003 09:10 PM

ok MiscGeek, i tried what you said - i cd'ed to the directory where Nnetsat is then i tryed "perl ./Nnetstat.pl" and this is what i get:

Can't locate Gtk.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at ./Nnetstat.pl line 9.
BEGIN failed--compilation aborted at ./Nnetstat.pl line 9.


i'm quick enough to realize the problem is probably something on line 9, but what everything else means, and what to do is beyond my experience so far. is there an easy fix for this? will i need to edit the Nnetstat file? i have no problem editing files as long as i know what i'm doing and what to type.

thanks a lot,

m

MiscGeek 09-19-2003 09:24 PM

Quote:

Originally posted by mercutio
ok MiscGeek, i tried what you said - i cd'ed to the directory where Nnetsat is then i tryed "perl ./Nnetstat.pl" and this is what i get:

Can't locate Gtk.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at ./Nnetstat.pl line 9.
BEGIN failed--compilation aborted at ./Nnetstat.pl line 9.


i'm quick enough to realize the problem is probably something on line 9, but what everything else means, and what to do is beyond my experience so far. is there an easy fix for this? will i need to edit the Nnetstat file? i have no problem editing files as long as i know what i'm doing and what to type.

thanks a lot,

m

mercutio,

I'm afraid we just went beyond my perl knowledge, which is not much :( It does look like it can't find a file that it requires. It could be missing entirely or be installed somewhere else on your box.

Hopefully a perl hacker will step up to the plate shortly and get you going :)

Mike

jalal 09-19-2003 11:42 PM

This script uses GTK for it's display. So, you'll need the perl-GTK modules.

http://www.gtkperl.org/

if it also uses GNOME, then you'll need to get the GNOME bindings as well.

mercutio 09-21-2003 06:16 PM

hey guys thanks. jalal, i have GNOME and Gtk installed. i can't remember what command to type to show what version - but i know it's installed.

thanks,

m

jalal 09-22-2003 12:04 AM

rpm -q <pkg name>

and if you don't know the exact name of the package you can:

rpm -qa | more

or

rpm -qa | grep <part of the name>


See if you have the perl bindings as well, if not, you'll need to get them.

megaspaz 09-22-2003 12:11 AM

mercutio, gnome and gtk aren't the only packages you need. as jalal stated before, you need perl-gtk packages.

mercutio 10-05-2003 09:45 PM

I know it has been awhile, but i finally installed the perl-gtk packages. i am still getting the same error that i posted before. this is getting very frustrating.

m

megaspaz 10-05-2003 10:58 PM

the only thing i can think of that's easy is to check the permissions on the Nnetstat.pl file. make sure it's set to execute.

or as root you can do a chmod 755 Nnetstat.pl

see if that works.

mercutio 10-09-2003 06:42 PM

here's what happened when i did what you said:

[root@localhost appz]# chmod 755 Nnetstat.pl
[root@localhost appz]#

nothing. sorry, i don't know what you mean by "check the permissions." can you explain with more details? i'm pretty sure i can do it - as long as i know what i'm doing.

thanks,

m

h/w 10-09-2003 07:01 PM

u wont get any message when u do a chmod. chmod changes the persmisions on files/dirs. when u did a chmod 755, it means u gave ur user permissions to read, write and exec. u gave the group and others to execute and read only, but no write. you will see these changes when u do a "ls -l". u will see "rwx-r-x-r-x" along with the netstat file.


All times are GMT -5. The time now is 01:52 AM.