You are not logged in.

#1 2017-10-19 09:02:25

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 62
Website

Matlab running only as superuser [SOLVED]

I have installed Matlab R2017a. If I run

 sudo /usr/local/MATLAB/R2017a/bin/matlab 

It works like a charm. If I try to launch Matlab as a normal user it returns this error message

 /usr/local/MATLAB/R2017a/bin/matlab
---------------------------------------------------------------------------
Warning: Cannot locate Java Runtime Environment (JRE) . . .
 
         1. Either a correct JRE was not available for redistribution when
            this release was shipped, in which case you should refer to the
            Release Notes for additional information about how to get it.
 
         2. Or you have tried to use the MATLAB_JAVA environment variable
            to specify an alternate JRE, but MATLAB cannot find it.  Please
            run 'matlab -n' to determine what value you are using for
            MATLAB_JAVA and fix accordingly.

Both java 9 and java 8 are installed on my system. Can you please give me a hint?
Thank you!

Last edited by Daedalus24 (2022-05-29 09:54:22)

Offline

#2 2017-10-19 09:30:14

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Matlab running only as superuser [SOLVED]

What's the output of...

archlinux-java status

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-10-19 11:07:16

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 62
Website

Re: Matlab running only as superuser [SOLVED]

The output is:

Available Java environments:
  java-8-openjdk
  java-9-openjdk (default)

It's really intriguing.

Offline

#4 2017-10-20 00:00:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,180

Re: Matlab running only as superuser [SOLVED]

Did you try running matlab -n?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2017-10-20 06:35:27

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 62
Website

Re: Matlab running only as superuser [SOLVED]

Yes I did.

The result is
https://pastebin.com/74EYxLic

If running Matlab as superuser, the outcome is
https://pastebin.com/6Aipv3SG

Last edited by Daedalus24 (2017-10-20 06:35:58)

Offline

#6 2017-10-20 08:01:59

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,673
Website

Re: Matlab running only as superuser [SOLVED]

Firstly please stop running matlab as root, and remedy yourself of whatever thought process convinced you that, if things fail to run as your unprivileged user, running them as root is a "good idea". This is exactly the sort of mentality that causes so many problems for users of certain other operating systems which shall remain nameless.

Create a new unprivileged user with default configs and see if they can run matlab. If they can, then there is a problem with your user's configuration files (most likely shell configs).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2017-10-20 08:29:44

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 62
Website

Re: Matlab running only as superuser [SOLVED]

Thank you for the replies and help. I created a new, unprivileged user, and nothing changed. I also installed Matlab on a laptop and it works there. I will delve into it and compare the two configurations.

Offline

#8 2017-10-20 16:23:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,180

Re: Matlab running only as superuser [SOLVED]

Have you tried running it from a bash shell? Why is the LD path different in the two cases?

Last edited by cfr (2017-10-20 16:26:36)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB