Solved

perl link

Posted on 2011-03-08
4
651 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 77

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

930 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

15 Experts available now in Live!

Get 1:1 Help Now