Installing Octave via Home-brew on MacOS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing Octave via Home-brew on MacOS

oleg efimov
Dear Octave,

We are trying to install Octave on macOS into the usr/bin

And this is via the home brew.

Could you please let us know how this works with the latest homebrew permission limits on 

The usr/bin

We are getting this error message because homebrew fails to install octave : 

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

We have tried to run the commands we need to run via the GUI version of OCTAVE.

However it requires the FreeSurfer dependencies for setting up the paths.

And this would assume that this would work within macOS usr/bin

Default directory for Octave.

If you could help or guide thank you!

Cheers, Oleg


"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 | Threaded
Open this post in threaded view
|

Re: Installing Octave via Home-brew on MacOS

siko1056
On 11/17/20 8:42 AM, oleg efimov wrote:

> Dear Octave,
>
> We are trying to install Octave on macOS into the usr/bin
>
> And this is via the home brew.
>
> Could you please let us know how this works with the latest homebrew
> permission limits on
>
> The usr/bin
>
> We are getting this error message because homebrew fails to install
> octave :
>
>   /usr/bin/octave: bad interpreter: No such file or directory
>
> We have tried to run the commands we need to run via the GUI version of
> OCTAVE.
>
> However it requires the FreeSurfer dependencies for setting up the paths.
>
> And this would assume that this would work within macOS usr/bin
>
> Default directory for Octave.
>
> If you could help or guide thank you!
>
> Cheers, Oleg

Dear Oleg,

The Octave project is only little involved into the Homebrew
development, thus it might be superior to ask at their community for
help [1] after some more web searching and to check for common issues
there [2].  "brew doctor" [3] is also a useful command to track
configuration errors.

For your particular error message, there I can find something similar
related to a configuration problem (MS Windows line endings on checkout)
of git on the macOS system in combination with ruby [2].

The Octave 5.2.0 GUI of Homebrew on macOS is VERY unstable and not to
recommend for any productive work.  Wait in this case for Octave 6 soon
or use the command-line interface CLI, once installed on your system.

If Homebrew continues to be reluctant, give the Octave.app [4] installer
a try.

HTH,
Kai

[1] https://github.com/Homebrew/homebrew-core/issues/new/choose
[2] https://docs.brew.sh/Common-Issues
[3] https://docs.brew.sh/Manpage
[4] https://github.com/octave-app/octave-app/releases


Reply | Threaded
Open this post in threaded view
|

Re: Installing Octave via Home-brew on MacOS

oleg efimov
Dear Kai,

This is very helpful information.

Thank you very much!

I would give it a go with MacPorts first since it is another path for Octave on the macOS. I did try the brew doctor. That seams working just fine.

Thank you Kai.

I think Octave are okay and I have found Homebrew simply depend on the new macOS changes. So linux would be very different with the same issue.

Thank you for your help. We will look into these recommendations.

I have never considered to try Octave installation with git and ruby combination yet.

Two things I have tried so far is the app that looks amazing.

Although because there is another dependency that is already written for the terminal environment …

It is best to have these amazing Octave installations made directly into the core system via the Homebrew or MacPorts

So far we have only tried Homebrew and it was reflecting on macOS side with the lock to the default directory Octave is after to be installed in.

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.

Thank you Kai. We will keep looking and try with MacPorts angle.

Have a good day.

Cheers, Oleg

> On 17/11/2020, at 5:48 PM, Kai Torben Ohlhus <[hidden email]> wrote:
>
> On 11/17/20 8:42 AM, oleg efimov wrote:
>> Dear Octave,
>> We are trying to install Octave on macOS into the usr/bin
>> And this is via the home brew.
>> Could you please let us know how this works with the latest homebrew permission limits on
>> The usr/bin
>> We are getting this error message because homebrew fails to install octave :
>>  /usr/bin/octave: bad interpreter: No such file or directory
>> We have tried to run the commands we need to run via the GUI version of OCTAVE.
>> However it requires the FreeSurfer dependencies for setting up the paths.
>> And this would assume that this would work within macOS usr/bin
>> Default directory for Octave.
>> If you could help or guide thank you!
>> Cheers, Oleg
>
> Dear Oleg,
>
> The Octave project is only little involved into the Homebrew development, thus it might be superior to ask at their community for help [1] after some more web searching and to check for common issues there [2].  "brew doctor" [3] is also a useful command to track configuration errors.
>
> For your particular error message, there I can find something similar related to a configuration problem (MS Windows line endings on checkout) of git on the macOS system in combination with ruby [2].
>
> The Octave 5.2.0 GUI of Homebrew on macOS is VERY unstable and not to recommend for any productive work.  Wait in this case for Octave 6 soon or use the command-line interface CLI, once installed on your system.
>
> If Homebrew continues to be reluctant, give the Octave.app [4] installer a try.
>
> HTH,
> Kai
>
> [1] https://github.com/Homebrew/homebrew-core/issues/new/choose
> [2] https://docs.brew.sh/Common-Issues
> [3] https://docs.brew.sh/Manpage
> [4] https://github.com/octave-app/octave-app/releases


--










"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 | Threaded
Open this post in threaded view
|

Re: Installing Octave via Home-brew on MacOS

Carlo de Falco-2


Il giorno 17 nov 2020, alle ore 06:00, oleg efimov <[hidden email]> ha scritto:

I would give it a go with MacPorts first since it is another path for Octave on the macOS. I did try the brew doctor. That seams working just fine.

You may also want to give a shot at the Octave.app distribution :


the 6.0.90 RC1 is just release candidate, but has seemd to work well until now, and more help in testing is definitely welcome.

Also its developer is using homebrew for the build so he may be able to provide guidance with that too.


c.




Reply | Threaded
Open this post in threaded view
|

Re: Installing Octave via Home-brew on MacOS

apjanke-floss
In reply to this post by oleg efimov


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

Cheers,
Andrew


Reply | Threaded
Open this post in threaded view
|

Re: Installing Octave via Home-brew on MacOS

oleg efimov
Dear Andrew,

The reason we are wanting it in usr/bin is because FreeSurfer - is because we are using scripts from https://brainder.org

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 brainder.org 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 <[hidden email]> 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

Cheers,
Andrew



"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.