没有C编译器在EC2上?编译器

2023-09-11 08:24:13 作者:过眼云烟

我一直想在我的EC2实例安装Gearman的,但是当我尝试运行./configure gearmand,我得到这样的:

I've been trying to install Gearman on my EC2 instance, but when I try to ./configure gearmand, I get this:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/ec2-user/gearmand-1.1.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

现在,奇怪的是,海湾合作委员会是最绝的安装。

Now, the strange thing is that GCC is most definitely installed.

which gcc46

返回

/usr/bin/gcc46

然而,当我尝试运行命令海湾合作委员会,它没有发现......

However, when I try to run the command "gcc", it's not found...

我试图删除/ intall /重新安装的gcc和gcc-C ++通过yum,但是这似乎并没有得到帮助。

I've tried to erase/intall/reinstall gcc and gcc-c++ via yum, but that doesn't seem to be helping.

有什么建议?先谢谢了。

Any advice? Thanks in advance.

推荐答案

您可以通过链接的/ usr / bin中/ gcc的解决这个问题在/ usr /斌/ gcc46 使用这个命令:

You can get around this by linking /usr/bin/gcc to /usr/bin/gcc46 using this command:

ln /usr/bin/gcc46 /usr/bin/gcc

当您升级 GCC ,则可以保留多个版本名为二进制文件的/ usr / bin中/ gccXX 和简单点的的/ usr / bin中/ gcc的链接,您要使用(这可能是最新的一个)的版本。

When you upgrade gcc, you can then keep multiple versions with binaries named /usr/bin/gccXX and simple point the /usr/bin/gcc link to the version you want to use (which will probably be the newest one).