Re: "octave" linked to "octave-3.6.1" but only "octave-3.6.1" will start octave
On 2012-03-01 16:24 +0100, Edward C. Jones wrote:
> I have just compiled and installed octave from source and removed the Debian
> octave packages. If I do
>
> cd /usr/local/bin
> ls -il
>
> the output includes
>
> 1584647 lrwxrwxrwx 1 root staff 12 Feb 29 22:14 octave -> octave-3.6.1
> 1584644 -rwxr-xr-x 1 root staff 7346 Feb 29 22:14 octave-3.6.1
>
> If I type "octave", it does not run. The error message is:
>
> bash: /usr/bin/octave: No such file or directory
^^^^^^^^^
Note the path here, this is not the place where you installed your local
octave binary.
> But "octave-3.6.1" or "./octave" both start octave.
>
> If cd to my home directory, "octave-3.6.1" runs octave but "octave" gives
> the same error message.
>
> Both the python and octave links appear to be soft links. "/usr/local/bin"
> is in my PATH. Why do python and octave behave differently?
This is a feature of the shell, it remembers the location of binaries it
had run to avoid having to look them up in $PATH again.
> What do I change so I can run octave by typing "octave"?
Try "hash -r", this clears the lookup table and forces the shell to search
in $PATH again.
Sven
Reply to: