[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing Octave via Home-brew on MacOS

From: oleg efimov
Subject: Re: Installing Octave via Home-brew on MacOS
Date: Wed, 18 Nov 2020 12:05:08 +1300

Dear Andrew,

The reason we are wanting it in usr/bin is because FreeSurfer - is because we are using scripts from

That has a built in octave’s default as they say path to feed this error back.

/usr/bin/octave: bad interpreter: No such file or directory

I am staying in touch with Anderson from and trying to figure out if this has been helpful to run it with MacPorts.

However I am getting a same error with the setup via MacPorts.

Now we also know this is a protected directory no matter anything we have tried to get this going the following error appears 

/usr/bin/octave: bad interpreter: No such file or directory

( same error )

This could be inside the Anderson’s script however it does not seam obvious for how to re-path it.

We have installed Octave via Homebrew, 2 stand alone versions and via the MacPorts.

There is a mention to 

% Before running, be sure that ${FREESURFER_HOME}/matlab is
% in the OCTAVE/MATLAB path.

However this does not seam obvious to how this is actually done.

Thank you for your email Andrew.

It make an absolute clear sense that Octave is not an issue in itself.

Neither Homebrew or MacPorts.

Since how you suggest to actually install to the directory of a custom location would be ideal.

And then point the Matlab to it is the main problem.

Since Octave seams to be installed and possibly in multiple places.

But not in the /usr/bin/octave

For where the script is wanting to refer it from.

Yes, we should use $PATH

Fantastic explanation Andrew.

Make a very clear sense to what on being for a look out.

Thank you. We will give it a go with Octave 6 also.

And will talk to Anderson to see how we can re-path scripts that use Octave commands.

Cheers, Oleg

P.S. All the best.

On 18/11/2020, at 12:21 AM, Andrew Janke <> wrote:

On 11/16/20 6:42 PM, oleg efimov wrote:
Dear Octave,
We are trying to install Octave on macOS into the usr/bin
And this is via the home brew.
> [...]
[...] >

Hi Oleg,

Is there a particular reason you're installing Octave into /usr instead of Homebrew's default location of /usr/local? /usr/bin is a system-controlled directory and is going to be protected using macOS's special access controls. You should not install anything there. Using Homebrew to install to /usr instead of /usr/local is not recommended or supported.

>  GUI version is very nice. Although we are just running another open source scripts that are dependent on the terminal command we would just have to have Octave in its default directory to be installed on the system.

There is no single default directory for Octave: if you build from source it goes into /usr/local or wherever you point it; Homebrew puts it in /usr/local or whatever your $PREFIX is; MacPorts puts it in /opt or something like that; Snap and Flatpak put it wherever they put it; and Linux distributions put it in /usr. If your project requires the `octave` command, it should either use $PATH to locate it, or search in several locations for it. I'd suggest adding a specific $MYAPP_OCTAVE_HOME environment variable to your project so users can point it to wherever they have Octave installed. 'Tis the nature of Unix.

You can also install the Octave 6 release candidate with:

$ brew install octave-app/octave-app/octave@6.0.90


"This communication is confidential and may contain privileged and/or copyright material. If you are not the intended recipient you must not use, disclose, copy or retain it. If you have received it in error please immediately notify me by return email, delete the emails and destroy any hard copies. Soul Machines Limited does not guarantee the integrity of this communication, or that it is free from errors, viruses or interference."

Please consider the environment before printing this email.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]