/usr/local/bin/perl ->/usr/bin/perl

/usr/local/bin/perl ->/usr/bin/perl

Post by Steve Smi » Sun, 14 Mar 1999 04:00:00



Can someone help me please.

I am trying to mirror a website that contains a lot of cgi scripts. Some
of the scripts have the header /usr/local/bin/perl and some have
/usr/bin/perl, either of which work on the remote server. Only
/usr/bin/perl works on my linux box. How do I get both to work on my linux
box.

Steve

 
 
 

/usr/local/bin/perl ->/usr/bin/perl

Post by Christoph Haberberg » Sun, 14 Mar 1999 04:00:00


On Sat, 13 Mar 1999 11:17 +0000 (Pacific Standard Time),


>Can someone help me please.

>I am trying to mirror a website that contains a lot of cgi scripts. Some
>of the scripts have the header /usr/local/bin/perl and some have
>/usr/bin/perl, either of which work on the remote server. Only
>/usr/bin/perl works on my linux box. How do I get both to work on my linux
>box.

create a symbolic link ...

ln -s /usr/bin/perl /usr/local/bin/perl

Christoph


 
 
 

/usr/local/bin/perl ->/usr/bin/perl

Post by Dmitri A. Sergatsk » Sun, 14 Mar 1999 04:00:00


On Sat, 13 Mar 1999 21:31:58 GMT,


>And, for the record, "/usr/local/bin/perl" is the *correct* location, as any
>PERL book will tell you.  I have no idea why Linux sticks it in the wrong
>place.

I do not know what kind of book you are reading but it is /usr/bin/perl
in "Programming perl" (Larry Wall and Randal Schwartz) and in
"Perl Cookbook" (just for the record).

It is common to put it in /usr/local/bin/perl on commercial
(non GNU based) UNIXes since it is usually not a part of the standart
distribution. gcc on the such systems also usually goes into /usr/local/bin

Quote:

>-Bill Clark

Regards,

Dmitri.

 
 
 

/usr/local/bin/perl ->/usr/bin/perl

Post by Frank Sweetse » Sun, 14 Mar 1999 04:00:00



>    ln -s /usr/bin/perl /usr/local/bin/perl

> And, for the record, "/usr/local/bin/perl" is the *correct* location, as any
> PERL book will tell you.  I have no idea why Linux sticks it in the wrong
> place.

huh?  do you even have a clue of /usr/ vs /usr/local/ ?  /usr/ is primarily
for vendor installed software, /usr/local/ is primarily for site installed
software.  since perl comes out of the box on practically every linux
install (hell, debian uses it for some of it's init scripts!), it qualifies
for /usr/  that said, perl (like most other well-written packages) is happy
to install just about anywhere - the Configure script explicitly says that
installing in your home dir is fine.

--
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net  | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.1        i586 | at public servers
We're all just stumbling around, colliding with one another, waiting in long
queues for our turn.  Our turn... hoping it will come.  We are but packets
in the Internet of life.        -- Userfriendly, march 4 1999

 
 
 

/usr/local/bin/perl ->/usr/bin/perl

Post by Villy Kru » Tue, 16 Mar 1999 04:00:00




>I guess I shouldn't have said that I have "no idea" why Linux sticks perl in
>/usr/bin, because I know damn well why it's put there and I happen to agree
>(and, if you really wanted to stick with the "seniority" method of placing
>binaries, PERL is older than Linux, so sticking it in /bin shouldn't really
>even be taboo).  That still doesn't change the fact that, outside the Linux
>community, perl5 in /usr/bin is wrong, and if you depend on it you *will*
>find your scripts breaking.

What it comes down to is that there should be a default location for
the perl binary excatly because to the many perl scripts which has this
location hard coded in the first line.  The discussion of whether the
perl program came with the system or is installed later is not relevant
for this standardisation.  The perl executable must be installed where
the scripts expects to find it.

You have a similar situation with sendmail.  The traditional location is
/usr/lib/sendmail, and a lot of programs depend on that.  Now, sendmail is
an executable, so it belongs in one of the bin directories, and as it is
not meant for normal users it is put in /usr/sbin.  But for compatibility
reasons there is a symbolic link /usr/lib/sendmail -> /usr/sbin/sendmail.

Villy

 
 
 

/usr/local/bin/perl ->/usr/bin/perl

Post by Villy Kru » Tue, 16 Mar 1999 04:00:00




>Where "should" perl be installed? /usr/bin. Where will the default location
>be in most future OS releases? /usr/bin. Where should you install perl
>_today_ (or symlink it) to make sure your scripts work in as many
>environments as possible? /usr/local/bin.

Both places.    One being a symlink to the other.

Villy

 
 
 

1. #!/usr/local/bin/perl -w || /usr/bin/perl -w

On Solaris 8, an old version of Perl is installed in
/usr/bin/perl, and a new version in /usr/local/bin/perl.

I want to use the newer version if it is there, otherwise
I want to use the older version. How do I convey the idea
in #! line?

#!/usr/bin/env perl
isn't an option as it depends on the user's PATH, which is not a good
idea for non-interactive use. For the script maybe run on cron or other
schedulers. It is better to make the script self sufficient. That is,
it should be able to run with "env -i ./script".

I did read the Perl book (3rd ed) page 488, but no solution is provided
there.

2. how can I copy&paste between 2 open vi sessions

3. #!/usr/bin/perl or #!usr/bin/perl

4. Q: Does Silicom network card works under Linux?

5. /usr/bin, /usr/local/bin, /sbin or /opt/bin, /var/opt/bin - I'm confused.

6. Scalability (?) of new Sun E10000 ?

7. /usr/bin/ls /usr/ucb/ls /usr/local/bin/ls

8. Time Sync On linux

9. /bin /usr/bin /usr/local/bin etc

10. /usr/local/bin vs. /usr/bin

11. how to combine /usr/bin and /usr/local/bin etc ??

12. Why /usr/bin instead of /usr/local/bin for gnu stuff?

13. setting executable path to both /usr/local/bin/ & /usr/bin/