Getting MATLAB 7.2 Running on Fedora Core 5 with SELinux

There may be a more elegant way to do this that requires giving fewer permissions to matlab under SELinux, but the following appears to work for me to get rid of the errors along the lines of the following:

/usr/local/matlab72/bin/glnx86/MATLAB: error while loading shared libraries: /usr/local/matlab72/bin/glnx86/../../sys/os/glnx86/libtermcap.so: cannot restore segment prot after reloc: Permission denied

One simply needs to enter the following commands (as root, or through sudo):

chcon -t texrel_shlib_t /usr/local/matlab72/sys/os/glnx86/*.sochcon -t texrel_shlib_t /usr/local/matlab72/bin/glnx86/*.sochcon -t texrel_shlib_t /usr/local/matlab72/toolbox/matlab/imagesci/private/*.mexglx

This may also work with newer (when they’re released) or older versions of MATLAB, though I’ve not tested them. According to the postings for other software packages that have had this problem, what MATLAB is doing is somehow bad programming practice, though I’ve not tracked down precisely what it is doing or why this might be bad. The alternatives that I’ve seen are either disabling SELinux entirely (rather ugly) or not running MATLAB (impossible 😉 ), and so this seems like a good solution.Here’s the closest bit of information I could find on the Fedora Core 5 SELinux FAQ:http://fedora.redhat.com/docs/selinux-faq-fc5/#faq-entry-unconfined_t

Advertisements
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: