Install GCC under Solaris (reprint)

Source: Internet
Author: User
Tags ftp

1. System Environment Preparation

A. The system shell is changed to bash because the system's default shell usage is not convenient.

# which bash

Usr/bin/bash

# usermod-s/usr/bin/bash Root

B. Establishment of the system. Profile file:

# Cp/etc/skel/local.profile/.profile

C. Add the following in the. profile file

Path=/usr/bin:/usr/local/bin:/usr/ucb:/etc:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:.

Export PATH

Export ps1= '/u:/w# '

D. Install the following kit from the Solaris 10 installation CD

# pkgadd–d/cdrom/solaris_10/product SUNWWGETR
# pkgadd–d/cdrom/solaris_10/product Sunwwgetu
# pkgadd–d/cdrom/solaris_10/product Sunwwgets
# pkgadd–d/cdrom/solaris_10/product SUNWGCMN

2. Download gcc software

# wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/gcc-3.4.6-sol10-x86-local.gz

# wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libiconv-1.11-sol10-x86-local.gz

# wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz

# wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libintl-3.4.0-sol10-x86-local.gz

Note: The first application for GCC, the following 3 library packages for GCC

3. Decompression and Installation

# Gunzip Gcc-3.4.6-sol10-x86-local.gz

# Gunzip Libiconv-1.11-sol10-x86-local.gz

# Gunzip Libgcc-3.4.6-sol10-x86-local.gz

# Gunzip Libintl-3.4.0-sol10-x86-local.gz

#pkgadd-D gcc-3.4.6-sol10-x86-local

#pkgadd-D libiconv-1.11-sol10-x86-local.gz

#pkgadd-D libgcc-3.4.6-sol10-x86-local.gz

#pkgadd-D libintl-3.4.0-sol10-x86-local.gz

4. Modify. Profile files

Add the following in the. profile file

Export Ld_libraey_path=/usr/local/lib:.

Export CC=GCC

Detailed source reference: http://www.jb51.net/os/Solaris/1701.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.