Winning the bid Kirin and CentOS installation gcc5.4.0

Source: Internet
Author: User
Tags bz2 gmp

Since Sango business trip to now immediately one months, I finally in this afternoon to run through the program, Research Linux really step-by-step bumpy, here to make a summary.

I. Installation of virtual machines and systems
Virtual machine installation process is relatively simple, and the default configuration does not need to be on the network because you want to set up a proxy server, regardless of the virtual machine network settings.
There are a few things you need to pay special attention to when installing the system:
1, CentOS has a "installation software" option, where the default is the smallest installation, pit AH. For me this novice know what is called the minimum installation, the end of a terminal interface to cry no tears Ah, installed two times to choose the GNOME desktop.
2, Kirin system needs to be aware of the manual installation of VMware Tools (provided by the tutorial has been very detailed, and I still Ann two times before the success), CentOS can install VMware tools.

Second, configure the network, yum, wget
1, CentOS and Kirin are all with their own Firefox browser. Find edit-> preferences in Firefox browser-> advanced-> network-> connection-> settings-> manually configure the agent
(had always thought that with the virtual machine network settings related to no less detours)

2, immediately to configure Yum. First in the terminal input Yum list if the connection failure will be clearly identified. Connection not general rules edit sudo vi/etc/yum.conf add
(assuming proxy.server.com is the proxy server address)
Proxy = http://proxy.server.com:8080
Proxy_username= User Name
Proxy_password = password

Then Yum list to try, show a lot of installation package is successful.

3, configure wget. This is a download tool, which also requires configuring the agent.
CD ~
Vi. WGETRC (Note that there is ".")
Http_proxy = http://proxy.server.com:8080/
Ftp_proxy = http://proxy.server.com:8080/
–proxy-user= User Name
–proxy-passwd= Password
Notice a little different from yum.conf.

Third, install gcc5.4.0
Because of Std::regex error, GCC needs to be updated. Yum install GCC can only be updated to 4.8.1, and gcc4.8.1 does not resolve the regex issue, so I need to install gcc5.4.0 manually. It can be said that I Ann four days in this big pit.
First you can enter gcc–version to view the current GCC version
GCC Download Address: ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases
gcc5.4.0, the gcc-5.4.0.tar.bz2 input tar-jxvf gcc-5.4.0.tar.bz2 get gcc-5.4.0 folder for the compressed package
mkdir Build (Future Operations directory)
CD gcc-5.4.0/
./contrib/download_prerequisites (This is where you download some of the files that are used to install GCC and fail if you do not configure wget.) )
Cd.. /build/(come to working directory)
Next to install GMP, MPFR, MPC
Gmp:
.. /gcc-5.4.0/gmp-4.3.2/configure
sudo make
sudo make install

MPFR:
.. /gcc-5.4.0/mpfr-2.4.2/configure
sudo make
sudo make install

Mpc
.. /gcc-5.4.0/mpc-0.8.1/configure
sudo make
sudo make install

Now it's time to install GCC.
.. /gcc-5.4.0/configure–enable-threads=posix–disable-checking–disable-multilib–enable-languages=c,c++
sudo make (and its time consuming, nearly two hours)
sudo make install

ok! no longer have to modify any files here, the input gcc–version will show gcc5.4.0 (CentOS 7 and Kirin are the same)
Back to the program, you may be prompted libstdc++ problem,

strings/usr/lib64/libstdc++.so.6 | grep GLIBC
View existing Glibcxx

strings/usr/local/lib64/libstdc++.so.6 | grep GLIBC
View the new glibxx after installing GCC

Rm/usr/lib64/libstdc++.so.6

Method One:
cp/usr/local/lib64/libstdc++.so.6.21/usr/lib64/
Ln-s

Method Two:
cp/usr/local/lib64/libstdc++.so.6/usr/lib64/

In addition, you have learned to use shared folders in your office. These things are like although I have three, but I will not state two AH.
Although always said that the programmer every day in trouble, one after another a new problem interlocking, but when their efforts to unlock one ring after another, successful customs clearance is too full of achievement. The while loop always gets better.

Related Article

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.