LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2009, 03:29 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
How to install perl in unix


Hi guys ,
This is my 2nd question in this forum.As i m completely new to this environment.I would like to know how to install perl on my linux machine.
I just know one thing about it that
" Perl interpreter is located at /usr/local/bin/perl."But i dont have perl directory at this location .
How do i go about it.
 
Old 09-09-2009, 05:29 AM   #2
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Is my question is too basic to be asked here?
 
Old 09-09-2009, 05:37 AM   #3
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
Quote:
Originally Posted by pinga123 View Post
Is my question is too basic to be asked here?
No, really

hope this helps:

http://www.misc-perl-info.com/install-perl.html

If you have any doubts, please let us know

Also include which distro are you using when posting the question, it'll be helpful if you do
 
Old 09-09-2009, 08:53 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Actually, /usr/bin/perl is the common place for it.
I'd definitely have a good look, as it's nearly always installed by default on Unix Linux these days.
Many sysadmin scripts are written in it.
As said, if you tell us your distro & version, we can prob tell you where it is.
Alternatively try these cmds

whereis perl
which perl
locate perl
find / -name perl -type -print 2>/dev/null # need to be root for this one
 
Old 09-09-2009, 11:19 PM   #5
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
I m using linux gnu

output of command whereis perl
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz
but when i tried to access /usr/bin/perl it says not a directory what to do?
[root@test ~]# cd /usr/bin/perl
-bash: cd: /usr/bin/perl: Not a directory
You have new mail in /var/spool/mail/root
[root@test ~]# cd /usr/bin/perl
-bash: cd: /usr/bin/perl: Not a directory

now what to do?

Last edited by pinga123; 09-09-2009 at 11:48 PM.
 
Old 09-09-2009, 11:25 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
/usr/bin/perl is the executable, not a directory

Code:
/usr/bin/perl -v

This is perl, v5.10.0 built for x86_64-linux-thread-multi

Copyright 1987-2007, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
 
Old 09-09-2009, 11:36 PM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
As Tinkster said.

Two little notes:
1)
Your title reads unix but your question reads linux. You might have chased some possible help away by talking about unix in the title. Try to be accurate in your posts.
2)
Please don't bump your post within 24 hours. Give it time to go around the world; when you're awake, the people who might know the answer might be sleeping so you don't win anything.
This forum has an automatic bump for unanswered posts for two days. So by answering your own post you did loose that option.

Last edited by Wim Sturkenboom; 09-09-2009 at 11:38 PM.
 
Old 09-10-2009, 01:27 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
As said, /usr/bin/perl is the executable file, not a dir, so you can't cd to it. Just cd to /usr/bin .
Also,
Quote:
I m using linux gnu
tells us nothing. GNU/Linux is the proper full name for Linux, but doesn't tell us which distro eg Centos, Fedora, Ubuntu etc.
Look in the /etc dir (as root) for a file with 'release' as part of it's name and use the cat cmd

cat /etc/*release*

and post the contents.

At least you now know you've got Perl installed.
PS you'll find these links handy:
http://perldoc.perl.org/
http://www.perlmonks.org/?node=Tutorials

Last edited by chrism01; 09-10-2009 at 01:28 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with invocation of unix commands from perl naeko Programming 5 07-08-2008 08:42 PM
Perl: Windows sending Unix commands? PB0711 Programming 3 10-17-2006 07:48 PM
Can I install unix perl into linux os? wood Linux - General 5 09-08-2003 09:47 AM
The Best Method to install Set up a Unix System with PERL, PHP and Apache rhuser Linux - Software 1 03-01-2003 11:31 PM
Unix/Perl/Sendmail behaving strangely! stephbock Linux - General 6 01-21-2003 04:56 PM


All times are GMT -5. The time now is 04:19 PM.

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