Centos6.5升级gcc for qt5.3.1

1、升级GCC
CentOS6.5内置的GCC版本为4.4,而Qt5.2.1则需要4.8.2的支持(支持C++ 11特性),因此,必须先升级GCC

wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2

tar vjf gcc-4.8.2.tar.bz2;

/opt/gcc-4.8.2/contrib && ./download_prerequisites;

./contrib/download_prerequisites
./configure --enable-checkingrelease --enable-languages=c,c++,java --disable-multilib
make -j4
make install

Warning: /opt/Qt5.4.1//Tools/QtCreator/bin/sdktool: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /opt/Qt5.4.1/Tools/QtCreator/bin/../lib/qtcreator/libUtils.so.1)

ln -s /usr/local/lib64/libstdc++.so.6.0.18 /usr/lib64/libstdc++.so.6

mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak,先备份原有的链接库。

mv /usr/local/lib64/libstdc++.so.6.0.18 /usr/lib64/libstdc++.so.6,替换即可

ln -s /usr/local/lib64/libstdc++.so.6.0.18 /usr/lib64/libstdc++.so.6;

 

你可能感兴趣的:(centos6)