Reputation: 323
I am a beginner in learning ubuntu and I've crashed my octave somehow. I first did
sudo apt-get install octave
which installed octave pretty fine, version 4.0.0. I decided (for some compability issues) to install octave 3.8.2 manually, i.e. compiling the sources, so downloaded the corresponding source files and I did
./configure && make && make install
Then I decided to remove the 3.8.2 version by doing a
make uninstall
After that I could not start my original octave via the command line as it says:
bash: /usr/local/bin/octave: No such file or directory
I decided to do
sudo apt-get remove octave
and then
sudo apt-get install octave
but that did not work. Can anybody help me on this issue and explain why my last step of removing octave via the package manager and then re-installing it did not bring back my original state?
Upvotes: 0
Views: 598
Reputation: 13091
If you build Octave from source chances are you used the default prefix so Octave will be at /usr/local/bin/
. Your package manager would install Octave at /usr/bin/
. Your error message is complaining about a missing octave at /usr/local/bin/
which means for some reason it's looking for your old installation.
But that's not how the shell works. When you start octave at the command line, the shell does not care where Octave is, it will look for it on the path. If Octave is missing, the error is different:
$ not-octave
-bash: not-octave: command not found
Your error comes when the path is already defined. Do you happen to have an alias that specifies the path? Maybe you set an alias and forgot about it (see .bashrc
or .profile
files):
$ alias not-octave='/usr/local/bin/not-octave'
$ not-octave
-bash: /usr/local/bin/not-octave: No such file or directory
Whatever it is that you have done, your system is looking for it in the wrong place. You are still able to call the octave installed by your package manager by specifying its path:
$ /usr/bin/octave -q --no-gui
octave:1>
Upvotes: 2