在Fedora 19中安装gcc-4.8.1时出现问题



根据gcc wiki网站上给出的安装说明-http://gcc.gnu.org/wiki/InstallingGCC,

tar xvzf gcc-4.8.1.tar.gz
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1 
make
make install

我试图在我的笔记本电脑上安装gcc。但是,在输入configure命令后进行安装时,我收到了以下错误。

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/fedora-19/Downloads/objdir':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

在输入下面的make命令后,将显示错误。

make: *** No targets specified and no makefile found.  Stop.

请对此问题提供指导。

我认为有一种最简单的方法可以在Fedora 19上安装gcc。你尝过百胜吗?使用类似sudo yum install gcc 的东西

您的错误意味着必须在configure命令期间生成的makefile不存在,因为您没有任何c编译器。您可以在config.log文件中看到详细信息。

您可以执行以下命令在fedora中安装GCC编译器:

yum-install gcc

执行此操作后,它会向您显示Total size和Total download size。

或者从网上下载gcc-4.4.7-3.el6.x86_64包并执行:

rpm-ivh gcc-4.4.7-3.el6.x86_64*

它可能会起作用。

这解决了问题,

$PWD/../configure
make
make install

最新更新