Clear Filters
Clear Filters

How-To install gcc-8 in Debian 10 (bullseye) for Matlab R2020b?

41 views (last 30 days)
As Debian 10 comes with gcc-10, I cannot mex c-files here, as Matlab says gcc-10 is too new.
R2020b's gcc version is gcc-8. I tried to install it but did't get far...
Please Help

Answers (2)

Andreas Goser
Andreas Goser on 11 Aug 2023
Just to to make sure you have seen the R2020b system requirements and supported compilers, I have linked them here.
In essence, you attempt to run a supported environement and are also correct abput GCC 10 being not supported.
The question now is what "but did't get far..." excactly means. Where are you stuck? Is there an error message?

Timo Dörsam
Timo Dörsam on 11 Aug 2023
gcc-8 is not included in Debian 10 anymore:
> sudo apt install gcc-8
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package gcc-8
Andreas Goser
Andreas Goser on 11 Aug 2023
OK, got it. So then we need to see if there are knowlesbale people in the community about this. When I ran a Google search "gcc 8 on debian 10", this thread is number 6, which makes me believe this is not a frequent issue.
Have you considered installing a more recent MATLAB release? You may say all your project partners agreed on using R2020b, but you could give it a try. One great aspect of MathWorks products is you can install multiple release in parallel.
Timo Dörsam
Timo Dörsam on 11 Aug 2023
We are already testing our productive models if there are problems with a new Matalab versions, but as this is critical for us, it's a long process, unfortunately...
We solved the Problem with a workaround... we found our old docker container that we had built some time ago, with old ubuntu and matlab, then I was able to mex.
But for Debian 10 I only found that you should set the apt/sources to an older version in order to install gcc-8, which some advise against in order not to damage the system.

Sign in to comment.


Find more on Introduction to Installation and Licensing in Help Center and File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!