2012-05-29 2 views
0

:관련 게시물을 확인한 후에도 루트 권한없이 GCC 4.7을 Linux에 설치할 수 없습니까? 게시물을 확인한 후

Install gcc on linux with no root privilege

https://stackoverflow.com/questions/9316118/installing-gcc-as-non-root

내 문제가 여전히 해결되지 않는 난 여기를 게시 할 수 있습니다.

gcc 버전 4.1.2 20080704 (Red Hat 4.1.2-52)로 Linux에 GCC 4.7을 설치하려고합니다.

prefix를 사용하여 configure를 실행하여 홈 디렉토리로 사용합니다.

./configure \ 
    --with-gmp=/remote/home/gcc_4_7_2012_5_28/gmp505 \ 
    --with-mpfr=/remote/home/gcc_4_7_2012_5_28/mpfr242 \ 
    --with-mpc=/remote/home/gcc_4_7_2012_5_28/mpc081 \ 
    --disable-libjava 

그런 다음 확인하십시오. 하지만 확인이 안된다. 오류가 발생했다.

make[1]: Entering directory `/remote/home/gcc_4_7_2012_5_28/trunk' 

make[2]: Entering directory `/remote/gcc_4_7_2012_5_28/trunk/host-x86_64-unknown-linux-gnu/fixincludes' 

autogen -T ../.././fixincludes/check.tpl ../.././fixincludes/inclhack.def 

make[2]: execvp: autogen: Permission denied 

make install is not ok. 

make[1]: Entering directory `/remote/home/gcc_4_7_2012_5_28/trunk' 
/bin/sh ./mkinstalldirs /usr/local /usr/local 

make[2]: Entering directory `/remote/home/gcc_4_7_2012_5_28/trunk/host-x86_64-unknown-linux-gnu/fixincludes' 

rm -rf /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/install-tools 
/bin/sh ../.././fixincludes/../mkinstalldirs /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/install-tools 

mkdir -p -- /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/install-tools 

mkdir: cannot create directory `/usr/local/libexec/gcc': Permission denied 

루트 권한을 얻을 수 없다.

도움을 주시면 감사하겠습니다.

감사합니다.

+1

구성을 실행할 때'--prefix' 인수가없는 것 같습니다. – nos

답변

1

GCC를 컴파일 할 때 은 소스 트리에 빌드하지 않아야합니다!

당신은 당신이 당신의 컴파일러가 그래서 당신 $LD_LIBRARY_PATH

$PATH$HOME/pref/lib$HOME/pref/bin를 추가하는 것이 좋습니다 $HOME/pref/bin/gcc-my4.7에 설치 찾을 수 귀하의 구성 인자에 접두사 물론

mkdir $HOME/gcc-build 
cd $HOME/gcc-build 
/your/path/to-source-tree/gcc-4.7.0/configure --prefix $HOME/pref \ 
     --program-suffix -my4.7 \ 
# other configure arguments go here 

같은 아마 뭔가를 잊어 버렸습니다

GCC를 성공적으로 설치하면 GCC MELT [meta-] 플러그인을 빌드하려고 시도 할 수 있습니다. 4.7

[email protected] 메일 링리스트는 그러한 도움을 얻을 수있는 좋은 장소입니다.

+1

감사합니다! 새로운 오류가 발생했습니다 : configure : error : 트리에서 구조를 만들지 만/remote/mypath/gcc_4_7_2012_5_28/trunk에는 host-x86_64-unknown-linux-gnu가 있습니다. 별도의 트리에서 빌드 할 때 원시 소스 트리를 사용하십시오. host-x86_64-unknown-linux-gnu를 제거해야합니까? 감사 ! – user1002288

+0

[email protected]는 구독하더라도 작동하지 않습니다. 그래서, 올바른 접두어를 가진 다른 디렉토리에 객체 파일의 접미어를 검사 했는데도 오류가 발생합니다 ... configure : error : in/remote/mypath/gcc_4_7_build_2012_5_28/x86_64-unknown-linux-gnu/libgcc ': configure : error : 오브젝트 파일의 접미사를 계산할 수 없다. 컴파일 할 수 없다. 자세한 것은'config.log'를 보라. make [2] : *** [configure-stage1-target-libgcc] 오류 1, 감사합니다. – user1002288

0

config.log 파일을 확인하고 "오브젝트 파일의 접미사 확인"을 찾아야합니다. 거기 어딘가에 오류 메시지가 나타나면 도움이 될 것입니다.

또는 EasyBuild를 사용하여 GCC 4.7을 빌드하십시오. 모든 작업은 http://hpcugent.github.com/easybuild을 참조하십시오.