Build and improve the Linux C ++ Development Environment

Source: Internet
Author: User

(1) In centos5.5:

1. Install with Yum (simplest ):

 

1.1 when using yum for installation, first ensure the latest source to upgrade the software in the system through the network software file image, such as directly executing the following on the terminal:

 

CD/etc/yum. Repos. d

MV CentOS-Base.repo CentOS-Base.repo.save

Wget http://centos.ustc.edu.cn/CentOS-Base.repo.5

MV CentOS-Base.repo.5 CentOS-Base.repo

Update

1.2 use: Yum install GCC and Yum install gcc-C ++ in sequence

Yum can automatically find the dependent packages of the software and automatically download and install the software.

1.3 because the autotools tools are generally used for compilation links, these tools include:

Autoscan

Aclocal

Autoheader

Autoconf

Automake

You can run the which command to check whether the directory is installed and installed.

 

Use yum for installation:

Yum install Autoconf and Yum install automake

Now, after installing the C ++ development, compilation, and link environment, you can start the C ++ programming journey.

Because this tool is relatively small, you can also choose to use the tar package for installation, basically no configuration, directly use the configuration in the configure file.

 

 

(Supplement: if:-Bash:./configure: Permission denied

Use: chmod 755 configure)

 

 

2. Use the RPM package for Installation

This method requires a large number of instances on the local machine. when installing the RPM package, you must set a large number of configuration options and handle the dependencies between packages. That is, you must install the packages in a certain order, which is troublesome. This method is applicable to the packages in the system installation file, or the installation method is generally used when the product is released and packaged.

 

 

(2) below Ubuntu:

Run the sudo apt-Get install build-essential command to install g ++. If you need an additional automake tool, use apt-Get install automake. It's amazing. The characteristics of Ubuntu and Linux are amazing !!!

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.