我正在尝试按照该教程http://www.tellurian.com.au/whitepapers/multiplegcc.php在 ubuntu 10.04 上安装 gcc 4.7.0 。经过一段时间安装依赖项后,我已经能够毫无错误地运行 make,但最后一步,make install 不想成功,最终导致权限被拒绝。
这是我所做的:
../gcc-4.7.0/configure --prefix=/usr/local/gcc/4.7.7 --enable-languages=c,c++
make
su -l
cd /groups/gobj
make install
最后一个命令的结果:
make[1]: Entering directory `/groups/gobj'
/bin/bash ../gcc-4.7.0/mkinstalldirs /usr/local/gcc/4.7.7 /usr/local/gcc/4.7.7
make[2]: Entering directory `/groups/gobj/fixincludes'
rm -rf /usr/local/gcc/4.7.7/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/install-tools
/bin/bash ../../gcc-4.7.0/fixincludes/../mkinstalldirs /usr/local/gcc/4.7.7/libexec
...
rm -f /usr/local/gcc/4.7.7/share/info/gccinstall.info
if [ -f doc/gccinstall.info ]; then \
for f in doc/gccinstall.info*; do \
realfile=`echo $f | sed -e 's|.*/\([^/]*\)$|\1|'`; \
/usr/bin/install -c -m 644 $f /usr/local/gcc/4.7.7/share/info/$realfile; \
chmod a-x /usr/local/gcc/4.7.7/share/info/$realfile; \
done; \
else true; fi
if /bin/bash -c 'install-info --version' >/dev/null 2>&1; then \
if [ -f /usr/local/gcc/4.7.7/share/info/gccinstall.info ]; then \
install-info --dir-file=/usr/local/gcc/4.7.7/share/info/dir /usr/local/gcc/4.7.7/share/info/gccinstall.info; \
else true; fi; \
else true; fi;
build/genhooks -d \
../../gcc-4.7.0/gcc/doc/tm.texi.in > tmp-tm.texi
/bin/bash: tmp-tm.texi: Permission denied
make[2]: *** [s-tm-texi] Error 1
make[2]: Leaving directory `/groups/gobj/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/groups/gobj'
make: *** [install] Error 2
我已经尝试过 su root, su -, su 没有成功。一些文件被有效地复制到 /usr/local/gcc/4.7.0 但进程停止了,我不明白为什么我以 root 身份登录。我检查过,文件 /groups/gcc-4.7.0/gcc/doc/tm.texi.in 存在。有什么帮助吗?