Trying to find and install libstdc++.so.5 to run C++ with mex for MATLAB

放肆的年华 提交于 2019-12-11 18:01:26

问题


I am using the BGL libraries for MATLAB found here on fileexchange. I get this error when using a function from this library under Ubuntu 10.04 LTS (this error did not occur under Windows, where it worked normally).

??? Invalid MEX-file
'/home/alex/Documents/MATLAB/MATLABsvnWorkingDir/Bloom/graphAnalysis/analysisAttempt2/functi    onsDownloaded/matlab_bgl-4.0.1/matlab_bgl/private/components_mex.mexglx':
libstdc++.so.5: cannot open shared object file: No such file or
directory.
Error in ==> components at 42
[ci sizes] = components_mex(A);
Error in ==> modularize_graphs_Alex_hugeMats_BlondelCode at 16
[comnts,~] = components(graph);

The whole problem appears to be with libstdc++.so.5. I cannot find it in the synatpic package manager. There is this thread which discusses the problem but I have tried those steps without any progress.

I tried the solution listed here:

alex@alex-laptop:~/Desktop$ sudo apt-get install libstdc++.so.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package libstdc++.so.5
alex@alex-laptop:~/Desktop$ 

I have also tried other solutions that I found on the web but nothing fixed the problem.


回答1:


Try using

sudo apt-get install libstdc++5

This should install the package, including the libs needed.



来源:https://stackoverflow.com/questions/16084323/trying-to-find-and-install-libstdc-so-5-to-run-c-with-mex-for-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!