1. view the sun OS version
Uname-a command to view the system version. It is known that it is SunOS.
SunOS 5.8 is called Solaris 8
SunOS 5.9 is called Solaris 9, so there will be no statement in the future. It will be Solaris 10.
The required software package for gcc installation is:
Gcc-3.4.6-sol10-x86-local libiconv-1.13.1-sol10-x86-local
Libgcc-3.4.6-sol10-x86-local libintl-3.4.0-sol10-x86-local
2. Install gcc
1. Download gcc-3.4.6-sol10-x86-local.gz at www.sunfreeware.com.
2. gunzip gcc-3.4.6-sol10-x86-local.gz
3. pkgadd-d gcc-3.4.6-sol10-x86-local
3. manually set the root environment variable and add PATH, LD_LIBRARY_PAT
PATH = "$ PATH":/usr/local/bin; export PATH
LD_LIBRARY_PATH = "$ LD_LIBRARY_PATH":/usr/local/lib; export LD_LIBRARY_PATH
After gcc-v is completed, the following error occurs: ld. so.1: gcc: fatal: libiconv. so.2: open failed: No such file or directory.
Install the libiconv Library
4. Install the libiconv Library
1. Download libiconv-1.11-sol10-x86-local.gz from www.sunfreeware.com
2. gunzip libiconv-1.11-sol10-x86-local.gz
3. pkgadd-d libiconv-1.11-sol10-x86-local
After the installation, the gcc-v does not return an error.
If you do not have make, you can install make and use it in the same way as make [Solaris].
Automake-1.10-sol10-x86-local.gz
Libiconv-1.11-sol10-x86-local.gz
Gcc-3.4.6-sol10-x86-local.gz
Openssl-0.9.8f-sol10-x86-local.gz
I have a total of four packages installed under solaris10, and then everything is OK!
From: guanwei blog