So i am running a linux mint installation and need to install gcc 7.1 locally in my home folder, but i cannot find a way to do so. Anyone here who knows the way to do it? Please keep in mind that i am very new to linux.
Asked
Active
Viewed 1,301 times
0
-
Possible duplicate of [Make install, but not to default directories?](https://stackoverflow.com/questions/3239343/make-install-but-not-to-default-directories) and [Adding a custom installation directory option to Autoconf-generated configure scripts](https://stackoverflow.com/q/3538705/608639) – jww Oct 18 '17 at 20:00
1 Answers
3
First, download the gcc sources: ftp://ftp.gnu.org/gnu/gcc/gcc-7.1.0/
Then follow the instructions from here to build and install: https://gcc.gnu.org/wiki/InstallingGCC
Assuming you want to install to /home/folder, you would do:
tar xzf gcc-7.1.tar.gz
cd gcc-7.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-7.1/configure --prefix=/home/folder --enable-languages=c,c++,fortran,go
make
make install