首先安装g++(点击这里下载):
1. 源代码或二进制安装expat
2. 二进制包安装libintl:pkgadd -d libintl-3.4.0-sol10-x86-local
3. 二进制包安装gettext: pkgadd -d gettext-0.14.1-sol10-intel-local
4. 源代码或二进制安装libiconv
5. 替换系统自带的iconv:
mv /usr/bin/iconv /usr/bin/iconv_old
ln -s /usr/local/bin/iconv /usr/bin/iconv
6. 二进制报安装gcc:pkgadd -d gcc-3.4.6-sol10-x86-local
安装Solaris 12.3和Oracle 10g,如有问参考
《Solaris 临时增减swap空间》http://www.linuxidc.com/Linux/2013-03/81435.htm
《Solaris 10 u10 中安装Solaris Studio12.3备记》http://www.linuxidc.com/Linux/2013-03/81436.htm
《Solaris 10 u10 安装 Oracle 10g2 链接时出现错误的解决方法》http://www.linuxidc.com/Linux/2013-03/81437.htm
设置环境变量(/etc/profile),增加如下行:
JAVA_HOME=/usr/jdk/jdk1.6.0_26
export JAVA_HOME
ORACLE_BASE=/export/home/oracle/oracle/product
export ORACLE_BASE
ORACLE_HOME=/export/home/oracle/oracle/product/10.2.0/db_1
export ORACLE_HOME
ORACLE_SID=orcl
export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_LANG
DISPLAY=localhost:0.0
export DISPLAY
QTDIR=/export/home/app/qt/4.7.5
export QTDIR
LD_LIBRARY_PATH=/usr/lib:/usr/ucb/lib:/usr/local/lib:/usr/sfw/lib:/usr/openwin/sfw/lib:$LD_LIBRARY_PATH:$QTDIR/lib:$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
PATH=$PATH:/usr/bin:/usr/ucb/bin:/usr/local/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:$QTDIR/bin:/export/home/app/opt/solarisstudio12.3/bin:$JAVA_HOME/jre/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH
export PATH
生成/export/home/dev_tools_gnu.sh文件,内容如下:
PATH=/usr/local/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb:/usr/ccs/bin:/export/home/app/opt/solarisstudio12.3/bin:$PATH
LD_LIBRARY_PATH=/usr/local/lib:/usr/openwin/lib:/usr/openwin/sfw/lib:/usr/sfw/lib:/usr/lib:/usr/ccs/lib:/export/home/app/opt/solarisstudio12.3/lib:/opt/SUNWits/Graphics-sw/xil/lib:/opt/SUNWmlib/lib:/export/home/app/opt/solarisstudio12.3/prod/lib:$LD_LIBRARY_PATH
INCLUDE=/usr/local/include:/usr/openwin/include:/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/include:/usr/local/include/c++/3.4.6:/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/include:/usr/sfw/include:/opt/SUNWmlib/include:/usr/include
export PATH
export LD_LIBRARY_PATH
export INCLUDE
然后执行:source /export/home/dev_tools_gnu.sh
貌似INCLUDE不太管用,没管它。
解压qt-digia-qt-4.7.5.tar.gz源码,到源码目录执行:
./configure -platform solaris-g++ -no-qt3support -prefix /export/home/app/qt/4.7.5 -L/opt/SUNWits/Graphics-sw/xil/lib -L/opt/SUNWmlib/lib -Lusr/openwin/lib -L/usr/openwin/sfw/lib -L/usr/sfw/lib -L/usr/ccs/lib -L/export/home/app/opt/solarisstudio12.3/prod/lib -L/usr/local/lib -I/usr/local/include -I/usr/openwin/include -I/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/include -I/usr/local/include/c++/3.4.6 -I/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/include -I/usr/sfw/include -I/opt/SUNWmlib/include -I/usr/include
成功后执行:gmake & gmake install
最后执行:qtdemo或qtdesigner验证Qt的安装。