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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-28-2014, 12:10 AM
|
#1
|
Member
Registered: Dec 2010
Posts: 242
Rep:
|
How to link Sed from /usr/bin/sudo to /usr/local/bin/sed
Hi Guys,
OS:- Solaris 10 64Bit
I have a small query.
On one server a user is facing sed command issue.
He gets error regarding sed for this location
Code:
/users/hoy/2999/batch5/bin/internal.sh[69]: /usr/local/bin/sed: not found
How ever the sed is actually present at this location on server:-
So I need to know How can I solve this problem?
I guess ln -s will do the trick here but need to know what exactly I need to do here?
And how to check version of sed here on the Server?
Please advise.
Thanks.
|
|
|
01-28-2014, 01:28 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by manalisharmabe
So I need to know How can I solve this problem?
|
Edit /users/hoy/2999/batch5/bin/internal.sh and change the path to the binary if hardcoded?
Quote:
Originally Posted by manalisharmabe
I guess ln -s will do the trick here
|
No. Given your questions I'd strongly suggest you don't focus on any "trickery" any time soon.
Quote:
Originally Posted by manalisharmabe
And how to check version of sed here on the Server?
|
If 'sed -V' or 'sed --version' don't work see 'sed --help' or 'man sed'?
|
|
1 members found this post helpful.
|
01-28-2014, 03:21 AM
|
#3
|
Member
Registered: Dec 2010
Posts: 242
Original Poster
Rep:
|
Quote:
Originally Posted by unSpawn
Edit /users/hoy/2999/batch5/bin/internal.sh and change the path to the binary if hardcoded?
No. Given your questions I'd strongly suggest you don't focus on any "trickery" any time soon.
If 'sed -V' or 'sed --version' don't work see 'sed --help' or 'man sed'?
|
From where can i download GNU version of sed?
sunfreeware.com is asking for paid membership.
and yes still i can t chek version of sed on solaris, above options does not work.
|
|
|
01-28-2014, 03:41 AM
|
#4
|
Member
Registered: Dec 2010
Posts: 242
Original Poster
Rep:
|
Hi all,
Thanks for reply.
I have downloaded GNU version of sed-4.2.2.tar.gz from this site.
Code:
ftp://ftp.gnu.org/gnu/sed
BUt I need to know how to install it.
After doing gunzip I got this in folder:-
Code:
-bash-3.2$ ls
ABOUT-NLS COPYING INSTALL NEWS THANKS bootstrap config_h.in doc po
AUTHORS COPYING.DOC Makefile.am README aclocal.m4 bootstrap.conf configure lib sed
BUGS ChangeLog Makefile.in README-alpha basicdefs.h build-aux configure.ac m4 testsuite
-bash-3.2$
-bash-3.2$ ls
ABOUT-NLS COPYING INSTALL NEWS THANKS bootstrap config_h.in doc po
AUTHORS COPYING.DOC Makefile.am README aclocal.m4 bootstrap.conf configure lib sed
BUGS ChangeLog Makefile.in README-alpha basicdefs.h build-aux configure.ac m4 testsuite
-bash-3.2$
Need to know how to install it, I also need to make sure that it is installed in /usr/local/bin.
Please advise.
Thanks
|
|
|
01-28-2014, 09:43 AM
|
#5
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,597
|
Quote:
Originally Posted by manalisharmabe
Hi all,
Thanks for reply.
I have downloaded GNU version of sed-4.2.2.tar.gz from this site.
Code:
ftp://ftp.gnu.org/gnu/sed
BUt I need to know how to install it. After doing gunzip I got this in folder:-
Code:
-bash-3.2$ ls
ABOUT-NLS COPYING INSTALL NEWS THANKS bootstrap config_h.in doc po
AUTHORS COPYING.DOC Makefile.am README aclocal.m4 bootstrap.conf configure lib sed
BUGS ChangeLog Makefile.in README-alpha basicdefs.h build-aux configure.ac m4 testsuite
-bash-3.2$
Need to know how to install it, I also need to make sure that it is installed in /usr/local/bin.
|
Did you try to READ THE INSTRUCTIONS??? Can you not see bot the README and INSTALL files...which, amazingly, tell you how to perform the installation. Also, you DO know that you can get this as a Solaris package, right???
And did you read post #2, where you were given a solution? You need to change the path in the script....there is NO REASON to do what you're doing. And installing a new version of sed on a server is something your systems administrator needs to do, and then they only need to do it if there is a VERY good reason to.
|
|
1 members found this post helpful.
|
01-28-2014, 10:42 PM
|
#6
|
Member
Registered: Dec 2010
Posts: 242
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
Did you try to READ THE INSTRUCTIONS??? Can you not see bot the README and INSTALL files...which, amazingly, tell you how to perform the installation. Also, you DO know that you can get this as a Solaris package, right???
And did you read post #2, where you were given a solution? You need to change the path in the script....there is NO REASON to do what you're doing. And installing a new version of sed on a server is something your systems administrator needs to do, and then they only need to do it if there is a VERY good reason to.
|
Thanks,
This is what INSTALL file say:-
Code:
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
As I need to install GNU version of sed in /usr/local/bin
do I need to do :- ./configure --prefix=/usr/local/bin ???
Please advise.
Modifying the script is last option.
By the way is there any site which can give me GNU version of sed in Solaris package format , that would be really nice.
Thanks a lot.
Last edited by manalisharmabe; 01-29-2014 at 02:54 AM.
|
|
|
01-29-2014, 09:29 AM
|
#7
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,597
|
Quote:
Originally Posted by manalisharmabe
Thanks,
This is what INSTALL file say:-
Code:
On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
As I need to install GNU version of sed in /usr/local/bin do I need to do :- ./configure --prefix=/usr/local/bin??? Please advise.
|
Again, if you can't understand the installation instructions, it's best if you don't actually try to USE THEM. Get your systems administrator to do this...the above snippet you posted is very clear. It's telling you to put your PATH in a certain order, to avoid getting them called too early in the build process.
Quote:
Modifying the script is last option.
|
No, modifying the script is the FIRST and BEST option. Putting multiple versions of SED out on a production system in different paths, or making symbolic links all over the place to accommodate ONE BROKEN SCRIPT is the 'last option'. Your systems administrator should be able to tell you all the reasons doing what you're doing is a bad idea.
Quote:
By the way is there any site which can give me GNU version of sed in Solaris package format , that would be really nice.
|
You can look things up for yourself, thanks.
|
|
|
All times are GMT -5. The time now is 12:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|