{"id":571,"date":"2016-04-01T18:30:21","date_gmt":"2016-04-01T23:30:21","guid":{"rendered":"http:\/\/bitc.bme.emory.edu\/~lzhou\/blogs\/?p=571"},"modified":"2016-04-01T18:30:21","modified_gmt":"2016-04-01T23:30:21","slug":"matlab-libgl-error-dlopen-usrlib64driswrast_dri-so-failed","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=571","title":{"rendered":"Matlab: libGL error: dlopen \/usr\/lib64\/dri\/swrast_dri.so failed"},"content":{"rendered":"<p>Starting Matlab R2015a or newer in CentOS7 or recent version of Fedora, the error<br \/>\nlibGL error: dlopen \/usr\/lib64\/dri\/swrast_dri.so failed<br \/>\nwill rise through does not affect the normal working of Matlab.<\/p>\n<p>This problem is caused by the libstdc++.so.6 coming with Matlab.<\/p>\n<p>Matlab carries statically linked libstdc++.so.6.0.17 in \/matlab_folder\/sys\/os\/glnxa64.  When the system version of libstdc++.so.6 is lower than the Matlab carried version, Matlab will run without rising any errors.  If your system&#8217;s libstdc++.so.6 version is higher than the matlab version, you will see the above error.<\/p>\n<p>The cure is to use link to your system version of libstdc++.so.6 instead of the link to libstdc++.so.6.0.17 in \/matlab_folder\/sys\/os\/glnxa64.<\/p>\n<p>For example, if in CentOS7, you can do<br \/>\nrm -f \/matlab_folder\/sys\/os\/glnxa64\/libstdc++.so.6<br \/>\nln -s \/usr\/lib\/libstdc++.so.6.0.19 \/matlab_folder\/sys\/os\/glnxa64\/libstdc++.so.6<br \/>\nand matlab will work without this error.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting Matlab R2015a or newer in CentOS7 or recent version of Fedora, the error libGL error: dlopen \/usr\/lib64\/dri\/swrast_dri.so failed will rise through does not affect the normal working of Matlab. This problem is caused by the libstdc++.so.6 coming with Matlab. Matlab carries statically linked libstdc++.so.6.0.17 in \/matlab_folder\/sys\/os\/glnxa64. When the system version of libstdc++.so.6 is lower [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-571","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=571"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions"}],"predecessor-version":[{"id":572,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions\/572"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}