Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
792 views
in Technique[技术] by (71.8m points)

linux - No C compiler on EC2?

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

returns

/usr/bin/gcc46

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

ln /usr/bin/gcc46 /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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...