Skip to content

Instantly share code, notes, and snippets.

@vibhoraggarwal
Last active January 14, 2020 15:11
Show Gist options
  • Save vibhoraggarwal/faadde604007ec4f1f6914f984d9a2a5 to your computer and use it in GitHub Desktop.
Save vibhoraggarwal/faadde604007ec4f1f6914f984d9a2a5 to your computer and use it in GitHub Desktop.
Install a previous version of gcc for Matlab in Ubuntu 18.04

Using the information from the answer in this link: We install the gcc-5.5.0 instead of 6.3.0 because of the fix mentioned here The fix was backported to gcc-6-branch in r249957 and to gcc-5-branch in r249958. So it's included in gcc-5.5.0 and will be included in gcc-6.5.0

tar xvzf gcc-5.5.0.tar.gz
cd gcc-5.5.0/
./contrib/download_prerequisites
cd ~
mkdir gcc-build && cd gcc-build
/path/to/the/extracted/folder/gcc-5.5.0/configure -v --prefix=$HOME/gcc-5.5.0 --disable-multilib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment