LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-28-2005, 03:17 AM   #1
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Rep: Reputation: 15
Linux programs(commands) path


Dear friends,

I have downloaded the ghostscript and compiled from the code successfully. This ghostscript binary is stored in /usr/local/bin/gs .

There is already older version of ghostscript and stored at /usr/bin/gs

My question is that How to make ghostscript /usr/bin/gs as active instead of /usr/local/bin/gs.

If I delete the gs in /usr/local/bin , then i get error stating that gs:command not found.

Please help me in this.
 
Old 03-28-2005, 03:41 AM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
There are multiple options, but my personal reccomendation would be to do this:
Code:
rm /usr/bin/gs
ln -s /usr/bin/gs /usr/local/bin/gs
This will create a symlink to the new gs file.
See man ln for more information.
 
Old 03-28-2005, 03:54 AM   #3
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
Using two versions of the same programm is begging for problems, unless "you really know what you are doing" (tm).

You state that after deleting (the offending new binary) /usr/local/bin/gs the "system" does not work correctly.

I think that your new installation of GS overwrote part of the old installation.

Delete the new GS, then delete the old GS (binaries, libraries, headers, everything) you should use the package manager for this. (rpm , apt-get or maybe emerge, you did not state your distro so I can't help you here)

Then install GS _once_

I'm curiuos, why did you try to install GS a second time anyway?
this should not be neccesary.
 
Old 03-28-2005, 10:05 PM   #4
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for help.

actually i am working on ghostscript devices/drivers.

I am studying epson device and modifying for my requirement.

I wanted to know any technique other than sym linking.

Any other techniques ?
 
Old 03-29-2005, 12:49 AM   #5
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
well yea /usr/local is the default for configure just so you can test stuff out from there without overwriting system stuff

all you wave to do to use the /usr/local/bin instead of /usr/local
is
export PATH=/usr/local/bin:$PATH

then search will begin with /usr/local/bin

if you need to use specific libs as opposed to system ones set LD_LIBRARY_PATH
 
Old 03-29-2005, 02:00 AM   #6
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
If you are developing a device driver you are well adviced to test this in a clean "testbed"

You can do this with UML Linux, VMware (if you have the money), boch/plex or Qemu or even just a complete chrooted enviroment.

To make life simple, you should only use _your_ version of GS there, than you can be absolutetly sure, that the GS you've compiled does the job (or not) because you programmed it that way, and not because of some kind of freak dependency problem.

In a development enviroment, never _ever_ mix new an old installs. This is the highway to hell, trust me.
 
Old 03-29-2005, 02:15 AM   #7
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for all tips..

Bye for now.
 
  


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
Commands in C++ Programs revolutionary_era Linux - Newbie 2 09-30-2005 04:06 PM
Executing Linux commands in C programs--->please help dennyvm Programming 3 01-15-2004 10:51 AM
Executing commands without using the full path.. LinuxBAH *BSD 2 12-02-2003 07:16 PM
what are some good networking commands for linux/programs chiatello Linux - Networking 3 07-30-2003 09:39 PM
Need help with path commands rdaves@earthlink.net Linux - General 7 06-27-2001 05:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:00 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
Open Source Consulting | Domain Registration