2017-10-18 96 views
-1

,所以我運行的Linux Mint的安裝,需要在我的主文件夾在本地安裝GCC 7.1,但我不能找到一個方法來做到這一點。這裏有誰知道如何做到這一點?請記住,我是非常新的Linux。GCC locallyInstalling GCC 7.1在本地主文件夾

+0

可能重複[make install,但不是默認目錄?](https://stackoverflow.com/questions/3239343/make-install-but-not-to-default-directories)和[添加一個銅stom安裝目錄選項添加到Autoconf生成的配置腳本](https://stackoverflow.com/q/3538705/608639) – jww

回答

0

首先,下載GCC來源: ftp://ftp.gnu.org/gnu/gcc/gcc-7.1.0/

然後按照從這裏說明構建和安裝: https://gcc.gnu.org/wiki/InstallingGCC

假設你想安裝到/ home /文件夾,你會怎麼做:

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