【AIX】AIX 6.1 “C compiler cc is not found”问题的解决方案

一、问题的由来

前几天在AIX中安装部署 nginx-1.4.1,报如下错误:

# cd nginx-1.4.1
# ./configure
checking for OS
 + AIX 1 0004F60BD400
checking for C compiler ... not found

./configure: error: C compiler cc is not found

二、“吐血的AIX”

AIX的恶心之处相信用过它的都知道:什么都要装!
在网上查了很多资料,得到的是一个结论,CC(C compiler) 需要花费 USD $4,300.00 看清楚,是美刀!
采购地址:http://www-03.ibm.com/software/products/us/en/xlcpp-aix
太黑了,疯狂敛财~~~ 崩溃中......
思绪万千…………
为啥 其他类unix发行版都可以有的呢?

三、GCC大美女

原来。。。。
有一个美女叫GCC,才华之横溢无人能敌! 人家用的就是GCC。
啊哈哈~~~额喜欢~~~
去她家(http://gcc.gnu.org/)一睹她了的容貌,只恨相见甚晚!!!

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). 
GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user's freedom.


看她最后的留言哦~~~ 她的免费的哦~~~

官方下载源:http://gcc.gnu.org/mirrors.html
IBM提供的GCC下载源:ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/ (返回上一层会有惊喜滴)
也可以去IBM 提供的 AIX Toolbox for Linux Applications 下载:http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html
当然万能的互联网不只有这三种方式能寻到她。。。Goooooogle一下你就知道!

四、把美女请回家

#### 安装gcc ###
# sudo rpm -ivh libgcc-4.2.0-3.aix6.1.ppc.rpm
# sudo rpm -ivh libstdcplusplus-4.2.0-3.aix6.1.ppc.rpm
# sudo rpm -ivh libstdcplusplus-devel-4.2.0-3.aix6.1.ppc.rpm
# sudo rpm -ivh gcc-cplusplus-4.2.0-3.aix6.1.ppc.rpm
# sudo rpm -ivh gcc-4.2.0-3.aix6.1.ppc.rpm
注意顺序哦,她们是有依赖滴~~~
用ubuntu用惯了,爱上了sudo,有时候本能地用sudo,改不过来。没有sudo的上Google下到处都是;或者用root登录亦可。

五、修改cc路径

# cd /bin
# ln -s gcc cc


你懂的。

原文地址:https://www.cnblogs.com/dyllove98/p/3226162.html