Executable not found from /usr/local/bin
Hi,
I installed ghostscript via yum package manager. Later I wanted a newer version of ghostscript and compiled it from source. "make install" placed the gs executable file under /usr/local/bin/gs. This works if I run the command with absolute path, but if try to run gs, the shell will output "-bash: /usr/bin/gs: No such file or directory" if I echo the path variable it will display /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin If i run whereis it will give me the correct path gs: /usr/local/bin/gs How do I make it work so that typing "gs" will run the executable file from the /usr/local/bin/gs? (I am using Centos 6) Thanks. |
what will say which gs and type gs ?
|
Your environment variable PATH does not include /usr/local/bin as one to be searched for commands. What you have to do is edit your profile (or the /etc/profile) and add that path.
then the next time you login/start a command window, bash will now search /usr/local/bin for commands as well as what it was searching before. |
redhat based systems normally do not have /usr/"local" in the system path
if you WANT!!! to use that location YOU need to add that location to $PATH so you installed ghosetscript to a FOLDER in /usr/local/bin "/usr/local/bin/gs" well you will need to add MANY MANY locations to a few DIFFERENT paths then Code:
/usr/local/bin/gs/bin -- $PATH it can CAUSE ALL KINDS OF EXTRA WORK if you do not think it through |
Actually, you don't need the PKG_CONFIG_PATH or C_INCLUDE_PATH unless you are rebuilding something that plugs into ghostscript.
And the easiest way to deal with the library is to add a configuration file to /etc/ld.so.conf.d that gives the path. Rerun ldconfig and everything is taken care of. |
All times are GMT -5. The time now is 05:00 PM. |