LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-15-2003, 09:52 PM   #1
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Rep: Reputation: 15
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
 
Old 09-16-2003, 06:41 AM   #2
jalal
Member
 
Registered: Aug 2003
Location: .bh
Distribution: Gentoo
Posts: 188

Rep: Reputation: 30
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.
 
Old 09-17-2003, 09:17 PM   #3
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
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
 
Old 09-17-2003, 09:54 PM   #4
MiscGeek
Member
 
Registered: Jan 2003
Location: Georgia, US
Distribution: RHEL WS4
Posts: 189

Rep: Reputation: 30
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
 
Old 09-18-2003, 09:10 PM   #5
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
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
 
Old 09-19-2003, 09:24 PM   #6
MiscGeek
Member
 
Registered: Jan 2003
Location: Georgia, US
Distribution: RHEL WS4
Posts: 189

Rep: Reputation: 30
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
 
Old 09-19-2003, 11:42 PM   #7
jalal
Member
 
Registered: Aug 2003
Location: .bh
Distribution: Gentoo
Posts: 188

Rep: Reputation: 30
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.
 
Old 09-21-2003, 06:16 PM   #8
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
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
 
Old 09-22-2003, 12:04 AM   #9
jalal
Member
 
Registered: Aug 2003
Location: .bh
Distribution: Gentoo
Posts: 188

Rep: Reputation: 30
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.
 
Old 09-22-2003, 12:11 AM   #10
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
mercutio, gnome and gtk aren't the only packages you need. as jalal stated before, you need perl-gtk packages.
 
Old 10-05-2003, 09:45 PM   #11
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
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
 
Old 10-05-2003, 10:58 PM   #12
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.
 
Old 10-09-2003, 06:42 PM   #13
mercutio
Member
 
Registered: Aug 2003
Location: right behind u
Distribution: Rh 9
Posts: 67

Original Poster
Rep: Reputation: 15
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
 
Old 10-09-2003, 07:01 PM   #14
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
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.

Last edited by h/w; 10-09-2003 at 07:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off




All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration