LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2009, 04:47 PM   #1
The Karl
LQ Newbie
 
Registered: Sep 2004
Location: Sweden
Distribution: Fedora 11
Posts: 26

Rep: Reputation: 15
trouble installing matlab


I've been trying to install matlab on my laptop, fedora 11.

I first installed matlab 2009 but my license file didn't seem to work, so i decided to uninstall and try again. I looked around on how to do this but ended up just removing the matlab directory. I think my current problems are due to this.

So I installed matlab again, but when i tried to run it i got this message:
Quote:
/opt/matlab/bin/glnx86/MATLAB: error while loading shared libraries: /opt/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmwrookfastbp.so: cannot restore segment prot after reloc: Permission denied
My first installation was in another directory. Guess that's why it says stuff about reloc. I changed permissions with chmod 777 for the whole matlab directory, but that changed nothing. I installed it again a couple of times but always with the same result....

After this I removed the matlab dir again and installed matlab 2008 instead. At the end of the installation procedure i chose 'Start Matlab' and I almost fell of my chair when it started So I thought everything was solved, but it wasn't...

I logged out and after a while came back. But when I tried to launch matlab from the terminal i again got the message included above Why did it start after the installation but not now?

I dont know how this works, but are there still stuff left from the first installs since i just removed the matlab dir?

Grateful for any help!
 
Old 09-09-2009, 04:59 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
I cannot explain why it worked immediately after the installation, but this is an issue with the SElinux enforcing. Here is the solution from the Mathworks support. I suggest to follow method 1 and avoid disabling SElinux completely or set it to permissive mode.

If you launch the SElinux GUI, you can do that just browsing through the tree of rules and check the proper entry about "text relocation of shared libraries". I don't have my installations notes at hand right now, otherwise I could tell where to find it exactly.

Anyway, the command line solution suggested by the link above, limits the text relocation permissions to MATLAB (instead of all applications) and in this sense is far better.

Last edited by colucix; 09-09-2009 at 05:05 PM. Reason: Added note about security
 
Old 09-09-2009, 05:09 PM   #3
The Karl
LQ Newbie
 
Registered: Sep 2004
Location: Sweden
Distribution: Fedora 11
Posts: 26

Original Poster
Rep: Reputation: 15
Wow thanks! that was quick It seems to be SELinux that is the problem.
 
Old 09-09-2009, 07:18 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,521

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
Quote:
It seems to be SELinux that is the problem.
if you can post the SELinux Troubleshooter " error then we could help more
I ,my self, don't use Matlab . I use Octave

90%+ of the time the SE error has a fix in the massage and most of the time the fix is running " restorcon" on something
 
Old 09-10-2009, 03:38 PM   #5
The Karl
LQ Newbie
 
Registered: Sep 2004
Location: Sweden
Distribution: Fedora 11
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
if you can post the SELinux Troubleshooter " error then we could help more
I ,my self, don't use Matlab . I use Octave

90%+ of the time the SE error has a fix in the massage and most of the time the fix is running " restorcon" on something
I solved the problem by following the guide and added matlab to some sort of allowed list. It works fine now

But I have another quick question. I use fluxbox and when I try to start Matlab from the fbrun the splash screen shows, but the program never starts. Right now i start it via
Code:
$ xterm -e matlab
but I dont like that since there will always be a useless terminal window open. If I close that terminal matlab terminates. It's the same when I add '&' at the end. Is there a way around this? (start matlab without the need for an open terminal window)

Last edited by The Karl; 09-10-2009 at 03:40 PM. Reason: added more info
 
Old 09-10-2009, 05:03 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
You have to run the matlab command using setsid. I don't know about fluxbox, but if fbrun is a sort of "execute command" dialog you have to type the following:
Code:
setsid /usr/local/bin/matlab -desktop
assuming you have a link to the matlab executable in /usr/local/bin. I use this in my custom launcher. I'm using KDE and in the panel I added a launcher with the following properties:

Executable: setsid
Command line arguments: /usr/local/bin/matlab -desktop
 
Old 09-10-2009, 05:50 PM   #7
The Karl
LQ Newbie
 
Registered: Sep 2004
Location: Sweden
Distribution: Fedora 11
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks! Exactly what I wanted
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help installing matlab 2008a zero_cool666 Linux - Software 8 06-16-2008 03:16 AM
Installing matlab play_play Linux - Newbie 12 02-19-2007 10:20 AM
Installing Matlab 7 on Fedora 4 Daley Linux - Software 8 02-18-2007 10:03 AM
Installing MAtlab on Linux? mfrangos79 Linux - Software 2 07-13-2005 10:47 PM
Installing Matlab 6.5 with Gentoo Frederik Linux - Software 4 05-20-2004 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration