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 |
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. |
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 |
Quote:
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 |
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 |
Quote:
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 |
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. |
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 |
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. |
mercutio, gnome and gtk aren't the only packages you need. as jalal stated before, you need perl-gtk packages.
|
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 |
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. |
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 |
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 12:14 AM. |