安装gcc时,提示no acceptable C compiler found in $PATH

tfuturer 2010-05-12 03:16:07
在GCC网站上(http://gcc.gnu.org)下载了gcc-4.5.0
解压缩到/usr/local/src/gcc-4.5.0
安装gcc时,提示no acceptable C compiler found in $PATH

执行命令:
/usr/local/src/gcc-4.5.0/configure --prefix=/usr/local/gccobjdir
提示如下:
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... /bin/sed
checking for gawk... gawk
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
我的root的PATH环境变量如下:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
我在网上百度了一下说是没有安装gcc的组件
请问应该怎么做呢
是不是系统中没有cc或者gcc等编译器或者环境变量CC没有指定系统上的编译器?
如果系统上没有编译器,就不能安装源代码形式的GCC啊
那应该怎么做呢?
我是要安装gcc啊 怎么获得c的编译器啊
...全文
22742 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
fangzhaoguo 2011-11-13
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 xiangliangyu2008 的回复:]

yum -y install gcc gcc-c++ gdb
[/Quote]

孩子,从我的帖子里拷贝内容有些不大合适吧
向良玉 2011-11-12
  • 打赏
  • 举报
回复
yum -y install gcc gcc-c++ gdb
子谋 2011-11-12
  • 打赏
  • 举报
回复
源码安装的基本条件是你得先有个编译器……
对于刚刚安装的系统来说,是没法进行编译器的源码安装的,只能通过软件包来安装,或者直接二进制安装……
如果你对编译器有要求,可以先随便安装一个c编译器,然后再源码安装你需要的那个编译器……
fangzhaoguo 2011-11-11
  • 打赏
  • 举报
回复
[Quote=引用楼主 tfuturer 的回复:]
▪ 你的数据中心属于云计算友好型...▪ 如何化解虚拟化与存储性能之间...▪ 并行计算与云计算的关系?▪ 什么是GPU?▪ Hadoop和云计算有什么关系?在GCC网站上(http://gcc.gnu.org)下载了gcc-4.5.0
解压缩到/usr/local/src/gcc-4.5.0
安装gcc时,提示no acceptable C compiler found in $PATH
……
[/Quote]

源代码版的gcc得用现有的gcc编译吧

你的电脑没有安好的gcc,所以会这样

我也遇到过这种情况

我是yum的

yum -y install gcc gcc-c++ gdb
rczjp 2011-11-11
  • 打赏
  • 举报
回复
同样与楼主一样的问题
我的gcc可以查看版本
也是不能编译为可执行文件,难道是缺少什么文件
KobeBrant8 2011-05-16
  • 打赏
  • 举报
回复
不知道你的具体情况是什么 你的linux版本是什么? 自己安装编译gcc的话是需要额外装几个包的 而且编译的过程要花很长时间
xiegang320 2011-05-06
  • 打赏
  • 举报
回复
我的系统是 debian x86_64 无桌面版
xiegang320 2011-05-06
  • 打赏
  • 举报
回复
我也遇到这个情况 checking whether the C compiler works... no 无语了 情况紧急,简直要崩溃了
xunxun 2011-05-06
  • 打赏
  • 举报
回复
你下载的是源码吧,源码必须需要编译器才能编译
louyong0571 2011-05-06
  • 打赏
  • 举报
回复 3
有点悖论的感觉,没有gcc要装个gcc,还必须要先有个gcc。O(∩_∩)O~
steptodream 2010-05-12
  • 打赏
  • 举报
回复
几个帖子我都回了
不知道楼主啥情况
Soulic 2010-05-12
  • 打赏
  • 举报
回复
这个很有可能是没安装C编译器,要么就是没有把编译器配置到PATH变量中
楼主应该是没有安装C编译器,不知道没有编译器,能不能使用rpm安装,这个问题没有遇到过
可以试试看yum install gcc,楼主的系统应该可以执行这个
benjaminweber 2010-05-12
  • 打赏
  • 举报
回复
安装GCC也是要先有一个可用的C compiler才行的
按你说的情况,确实需要用rpm先安装一个gcc
tfuturer 2010-05-12
  • 打赏
  • 举报
回复
要用rpm安装么
weilong8998 2010-05-12
  • 打赏
  • 举报
回复
帮顶呀,我是装系统的时候,就把GCC装好了的
LoadRunner监控Linux rstat协议允许网络上的用户获得同一网络上各机器的性能参数。 需要下载3个包: (1)rsh-0.17-14.i386.rpm (2)rsh-server-0.17-14.i386.rpm (3)rpc.rstatd-4.0.1.tar.gz 一、安装rsh 查看是否安装并卸载rsh [root@localhost /]# rpm –qa |grep rsh      --查看是否安装rsh [root@localhost /]# rpm –e + 版本号   --卸载该版本 安装rsh,rsh-server [root@localhost /]# rpm –ivh rsh-0.17-14.i386.rpm [root@localhost /]# rpm –ivh rsh-server-0.17-14.i386.rpm 二、安装rstatd 下载并安装rstatd,下载地址:http://sourceforge.net/projects/rstatd,上传至/usr/local 查看是否安装,一般来说Linux都没有安装 [root@localhost /]# find / -name rpc.rstatd 安装rstatd [root@localhost /]# tar -xzvf rpc.rstatd-4.0.1.tar.gz [root@localhost /]# cd rpc.rstatd-4.0.1 [root@localhost /]# ./configure [root@localhost /]# make [root@localhost /]# make install 三、安装完成后配置rstatd目标守护进程xinetd,配置文件于/etc/xinet.d目录下 修改/etc/xinetd.d目录下面的3个conf(rogin,rsh,rexec)中的disable均设置为no [root@localhost /]# cd /etc/xinetd.d      --进入到/etc/xinetd.conf目录中 [root@localhost /]# vi rlogin     --编辑disable=no,保存 [root@localhost /]# vi rsh  --编辑disable=no,保存 [root@localhost /]# vi rexec --编辑disable=no,保存 四、启动rpc.rstatd [root@localhost /]# rpc.rstatd --启动rpc.rstatd进程 [root@localhost /]# rpcinfo -p --执行此命令检查rpc服务的状态 如果未出现上图的rstatd说明没有安装成功,需要重复以上步骤。 到这里为止,LR监控Linux必要的服务都已安装好了。 五、关闭防火墙 [root@localhost /]# service iptables stop 六、利用LR中的Controller监控Linux资源 在Controller中,将System Resource Graphs中的Unix resources拖到右侧的资源监控区域。 鼠标右键选择Add Measurements,添加被监控Linux的IP地址x.x.x.x,选择需要监控的性能指标,确认。 七、遇到的问题 1. LoadRunner监控Linux资源弹出如下错误: Monitor name :UNIX Resources. Cannot initialize the monitoring on 192.168.52.189. Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧