Solved

perl link

Posted on 2011-03-08
4
649 Views
Last Modified: 2013-11-17
My perl should be usr/bin/perl and not /usr/local/bin/perl, what should I do to modify this.

root@csc06r11 # which perl
/usr/local/bin/perl

My env is

MANPATH=/usr/man:/usr/autotree/autosys/doc
LANG=en_US
WSM_WS_CMD="startsrc -s http4websm"
VVTERMCAP=//vvtermcap
LOGIN=root
SQRTOOLS=/usr/sqr6/syb/bin
PAGER=pg
PATH=/usr/autotree/autosys/bin:/usr/bin:/usr/local/lib:/usr/local/bin:/sybase/ASE-12_0/bin:/sybase/OCS-12_0/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java130/jre/bin:/usr/java130/bin
SQRDIR=/usr/sqr6/syb/bin
SYBPLATFORM=rs6000
ORACLE_BASE=/optware/oracle
AUTOSERV=LMQ
LC__FASTMSG=true
CGI_DIRECTORY=/var/docsearch/cgi-bin
LOGNAME=root
MAIL=/usr/spool/mail/root
LOCPATH=/usr/lib/nls/loc
PS1=[$PWD]
WSM_DOC_DIR="/usr/websm/http/com.ibm.websm.http.server_1.0.0"
DOCUMENT_SERVER_MACHINE_NAME=localhost
USER=root
DSQUERY=prodlmdb
AUTHSTATE=files
DEFAULT_BROWSER=netscape
SHELL=/usr/bin/ksh
ODMDIR=/etc/objrepos
DOCUMENT_SERVER_PORT=49213
HOME=/
AUTOUSER=/usr/autotree/autouser
TERM=xterm
MAILMSG=[YOU HAVE NEW MAIL]
ORACLE_HOME=/optware/oracle/product/9.2.0/db_1
PWD=/usr/opt
DOCUMENT_DIRECTORY=/usr/docsearch/html
TZ=EST5EDT
WSM_CGI_DIR=
A__z=! LOGNAME
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
LIBPATH=/usr/lib:/usr/local/lib:.:
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/optware/oracle/product/11.1.0/client_1/


0
Comment
Question by:mnis2008
  • 2
4 Comments
 
LVL 9

Expert Comment

by:svs
ID: 35071374
If you have root access, run  
ln -s /usr/local/bin/perl /usr/bin/perl

Open in new window

0
 

Author Comment

by:mnis2008
ID: 35071406
How do I actually set it in my enviroment such that it searches for perl in /usr/bin and not in /usr/local/bin
0
 

Author Comment

by:mnis2008
ID: 35071413
I need to link /usr/bin/perl to /usr/opt/perl5/bin/perl5.8.2_64bit
0
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 35072021
You can redefine the $PATH $path variable depending on your shell.
This is the search path
echo $PATH
echo $path
The search is from left to right.
changing the order of entries will change where an item that exists in two places is located
PATH=/usr/bin:/usr/local/bin:$PATH
will mean that when you run perl, /usr/bin/perl will be found versus /usr/local/bin/perl.
alternatively, if for what you want to do, you must use /usr/bin/perl, use /usr/bin/perl Makefile.PL

you could add /usr/opt/perl5/bin/ as the first entry in the $PATH
export PATH=/usr/opt/perl5/bin:$PATH
presumably there is a perl within that location that links to perl5.8.2_64bit.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now