当前位置: 技术问答>linux和unix
Linux 上安装 gcc 出现错误
来源: 互联网 发布时间:2016-08-30
本文导语: Linux 上安装 gcc 出现错误 如下: 安装命令: [root@localhost gcc-4.4.3]# /usr/local/src/gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3 --enable-threads=posix --disable-checking --enable--long-long --host=i386-redhat-linux --with-system-zlib --enable-l...
Linux 上安装 gcc 出现错误 如下:
安装命令:
[root@localhost gcc-4.4.3]# /usr/local/src/gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3 --enable-threads=posix --disable-checking --enable--long-long --host=i386-redhat-linux --with-system-zlib --enable-languages=c,c++,java
错误提示:
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... i386-redhat-linux-gnu
checking target system type... i386-redhat-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 i386-redhat-linux-gcc... no
checking for gcc... no
checking for i386-redhat-linux-cc... no
checking for cc... no
checking for cc... no
checking for i386-redhat-linux-cl... no
checking for cl... no
configure: error: in `/usr/local/gcc-4.4.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
请大家看看 错误在哪里 谢谢~~
安装命令:
[root@localhost gcc-4.4.3]# /usr/local/src/gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3 --enable-threads=posix --disable-checking --enable--long-long --host=i386-redhat-linux --with-system-zlib --enable-languages=c,c++,java
错误提示:
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... i386-redhat-linux-gnu
checking target system type... i386-redhat-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 i386-redhat-linux-gcc... no
checking for gcc... no
checking for i386-redhat-linux-cc... no
checking for cc... no
checking for cc... no
checking for i386-redhat-linux-cl... no
checking for cl... no
configure: error: in `/usr/local/gcc-4.4.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
请大家看看 错误在哪里 谢谢~~
|
你的系统没有c编译器
建议你用rpm包安装
或者yum apt-get的方式安装
建议你用rpm包安装
或者yum apt-get的方式安装
|
当然是在虚拟机里的redhat里安装了
如果你的虚拟机可以上网 试试命令
yum -y install gcc
来安装(不过要是redhat9或者更低版本貌似不yum不好用)
要是上述方法不行 你就只能下载rpm安装包安装gcc了
http://www.linux521.com/2009/newbie/200901/266.html
如果你的虚拟机可以上网 试试命令
yum -y install gcc
来安装(不过要是redhat9或者更低版本貌似不yum不好用)
要是上述方法不行 你就只能下载rpm安装包安装gcc了
http://www.linux521.com/2009/newbie/200901/266.html