AIX6.1上升级安装gcc 4.2.0-3

用户来信表达了:We are now facing the apache compile failure issue, and we found out it’s should be the very old version GCC, while the OS was already upgrade to 6100 but we are still using GCC for powerpc-ibm-aix5.3.0.0,

and "We had checked this compile could be finished successfully on GNU C (GCC) version 4.4.7, for you reference."
也就是用户觉得目前的compile失败是因为当前的gcc版本过低导致的,建议我们帮助升级
系统上:
#gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0
Thread model: aix
gcc version 4.0.0
#rpm -qa
libgcc-4.0.0-1
gcc-4.0.0-1
libstdc++-4.0.0-1
libstdc++-devel-4.0.0-1
gcc-c++-4.0.0-1
cdrecord-1.9-9
AIX-rpm-6.1.8.15-4
......

上IBM官网看了一下,AIX 6.1对应gcc版本是4.2.0-3
http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html#G

也就是相对应的要下载五个对应的高版本rpm包
4.38M    gcc-4.2.0-3.aix6.1.ppc.rpm
3.15M    gcc-cplusplus-4.2.0-3.aix6.1.ppc.rpm
0.18M    libgcc-4.2.0-3.aix6.1.ppc.rpm
2.76M    libstdcplusplus-4.2.0-3.aix6.1.ppc.rpm
50.48M   libstdcplusplus-devel-4.2.0-3.aix6.1.ppc.rpm
(公司内网防火墙重重,屋漏偏逢连夜雨,家里网络检修瘫着,幸好楼大人帮忙用服务器down了给我)

然后按照网上的指引,
1#rpm -ivh gcc-4.2.0-3.aix5.3.ppc.rpm
2#rpm -ivh libgcc-4.2.0-3.aix5.3.ppc.rpm
3#rpm -ivh libstdcplusplus-4.2.0-3.aix5.3.ppc.rpm
4#rpm -ivh libstdcplusplus-devel-4.2.0-3.aix5.3.ppc.rpm
5#rpm -ivh gcc-cplusplus-4.2.0-3.aix5.3.ppc.rpm

但是第一步就有问题一:
# rpm -ivh gcc-4.2.0-3.aix6.1.ppc.rpm
file /opt/freeware/bin/gcov from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/info/cpp.info.gz from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/info/cppinternals.info.gz from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/info/gcc.info.gz from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/info/gccinstall.info.gz from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/info/gccint.info.gz from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/bin/gcc from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/bin/cpp from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/man/man1/gcov.1 from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/man/man1/gcc.1 from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
file /opt/freeware/man/man1/cpp.1 from install of gcc-4.2.0-3 conflicts with file from package gcc-4.0.0-1
#
不明白了,这算成没成功啊,暂时先不管吧。
接下去跑,结果在第五步的时候报错了:
error: failed dependencies:
        gcc = 4.2.0-3 is needed by gcc-c++-4.2.0-3
gcc是gcc-c++的依赖包,这样说明我之前没装成功,
那我们现在看看状态
#rpm -qa
libgcc-4.2.0-3
libgcc-4.0.0-1
gcc-4.0.0-1
libstdc++-4.2.0-3
libstdc++-4.0.0-1
libstdc++-devel-4.0.0-1
gcc-c++-4.0.0-1
AIX-rpm-6.1.8.15-4
libstdc++-devel-4.2.0-3
直接安装,变成并存了,这个不是我想要结果。
先把安装的4.2.0-3版本组件卸载(rpm -e)
换用rpm -Uvh gcc-4.2.0-3.aix6.1.ppc.rpm
还是报这个错:error: failed dependencies:
        gcc = 4.0.0-1 is needed by gcc-c++-4.0.0-1
掠过,执行其他,也是有缺乏依赖包的error
哪里错了么?
感谢楼大人,原来问题一处出现的提示的意思就是现在安装的版本和原版本冲突,解决办法覆盖升级或先删除低版本在全新安装。
另外,把这些高版本的rpm包放在一个目录下,直接用命令
rpm -Uvh *

自动安装,妥妥的。
搞定发邮件,对方确认能使用了。

                                                                                                          2014/11/17 

你可能感兴趣的:(gcc,version,AIX,rpm,failure)