Configure gcc/GDB and environment variables for Solaris installation

Source: Internet
Author: User
~ /. Profile is a file in the user's home directory. Every time a user logs on, the ENV Environment variable settings will be executed here.

/Etc/profile is a global environment variable setting. As long as users log on to the system, they will execute the ENV Environment Variable setting.

~ /. Kshrc is in the user's home directory. Each time you execute the sub-Shell under ksh, The ENV Environment variable settings in this directory will be executed.

~ /. Dtprofile is under the user's home directory. Here, you can set some variable settings when you enter CDE. if the user has not entered the system through CDE, this file will not be generated only when the user has used CDE to enter the system. dtprofile file, and you can also set the variables in it
 
So my environment variables are set in/etc/profile.
Path =/usr/sbin:/usr/bin:/sbin:/usr/UCB:/usr/local/bin:/usr/CCS/bin
LD_LIBRARY_PATH =/usr/local/lib

The first line is the path of some commands.
The second line is debugging with GCC/g ++.ProgramLibrary File Path

Because Solaris does not have the GCC/GDB debugging tool after installation, it must be manually installed. I downloaded the following installation packages and FTP them to my virtual machine. The installation steps are as follows:

Gunzip expat - 1.95 . 5 - Sol10 - Intel - Local . GZ
Gunzip GDB - 6.6 - Sol10 - X86 - Local . GZ
Gunzip libiconv - 1.11 - Sol10 - X86 - Local . GZ
Gunzip gcc - 3.4 . 6 - Sol10 - X86 - Local . GZ
Gunzip libgcc - 3.4 . 6 - Sol10 - X86 - Local . GZ
Gunzip ncurses - 5.6 - Sol10 - X86 - Local . GZ

Pkgadd - D expat - 1.95 . 5 - Sol10 - Intel - Local
Pkgadd - D GDB - 6.6 - Sol10 - X86 - Local
Pkgadd - D libiconv - 1.11 - Sol10 - X86 - Local  
Pkgadd - D gcc - 3.4 . 6 - Sol10 - X86 - Local
Pkgadd - D libgcc - 3.4 . 6 - Sol10 - X86 - Local
Pkgadd - D ncurses - 5.6 - Sol10 - X86 - Local

First, decompress the package, and then install the package using the command of the Solaris installation package.
Here is another command to uninstall the package: pkgrm

In fact, a package can not be installed, because the LD_LIBRARY_PATH variable is not set and libstdc ++ is not found. so.6, So I mistakenly believe that there is no libgcc-3.4.6-sol10-x86-local package, repeated installation, there is still no big problem, but be sure to set the variable mentioned above, otherwise, an error occurs when running the C program.
the above is a simple process of installing gcc/GDB occasionally, and some FTP operations are involved, it mainly describes ftpusers in the ftpd folder.

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.