CentOS6.5 upgrade to manually install gcc4.8.2, centos6.5gcc4.8.2

Source: Internet
Author: User

CentOS6.5 upgrade to manually install gcc4.8.2, centos6.5gcc4.8.2

Reprinted Source: http://www.cnblogs.com/zeyuan/p/4251256.html, simple installation environment CentOS6.5 64bit, the original 4.4.7, cannot support C ++ 11 features ~, To upgrade to 4.8.2 can not be upgraded through the yum method, you need to manually download the installation package and compile 1.1 to get the installation package and unzip the wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 tar-jxvf gcc-4.8.2.tar.bz2 of course, The http://ftp.gnu.org/gnu/gcc contains some gcc version for download, the latest version is 4.9.2. 1.2 download reference [1] of Dependencies for compilation: this magical script file will help us download, configure, and install the dependency library, saving us a lot of time and energy. Cd gcc-4.8.0. /contrib/download_prerequisites 1.3 create a directory for the compiled files to store mkdir gcc-build-4.8.2 cd gcc-build-4.8.2 1.4 generate Makefile file .. /configure-enable-checking = release-enable-versions ages = c, c ++-disable-multilib 1.5 compilation (Note: This step is very time-consuming) the make-j4-j4 option is the make Optimization for multi-core processors. If it fails, use make. The related optimization options can be moved to the references [2]. An error occurred while installing this step. Error Description: copy the code compilation terminated. make [5]: *** [_ gcov_merge_add.o] Error 1 make [5]: leaving directory '/home/imdb/gcc-4.8.2/gcc-build-4.8.2/x86_64-unknown-linux-gnu/32/libgcc 'make [4]: *** [multi-do] Error 1 make [4]: leaving directory '/home/imdb/gcc-4.8.2/gcc-build-4.8.2/x86_64-unknown-linux-gnu/libgcc 'make [3]: *** [all-multi] Error 2 make [3]: * ** waiting for unfinished tasks .... make [3]: Leaving directory '/home/imdb/gcc-4.8.2/gcc-build-4.8.2/x86_64-unknown-linux-gnu/libgcc 'make [2]: *** [all-stage1-target-libgcc] Error 2 make [2]: leaving directory '/home/imdb/gcc-4.8.2/gcc-build-4.8.2' make [1]: *** [stage1-bubble] Error 2 make [1]: leaving directory '/home/imdb/gcc-4.8.2/gcc-build-4.8.2' make: *** [all] Error 2 copy the code for a rough look, errors are concentrated in x86_64unknown-linux-gnu/32/libgcc and x86_64-unknown-linux-gnu/libgcc according to references [3], install the following two packages (for CentOS6.X only ): sudo yum-y install glibc-devel.i686 glibc-devel process CPU is basically full load: 1.6, install sudo make install II, verify the installation restart, and then view the gcc version: gcc-v tries to write a program segment tryCpp11.cc with the C ++ 11 feature, and uses shared_ptr to copy code 1 // tryCpp11.cc 2 # include 3 # include 4 5 int main () 6 {7 std: shared_ptr pInt (new int (5); 8 std: cout <* pInt <std: endl; 9 return 0; 10} copy the code verification file: g ++-std = c ++ 11-o tryCpp11 tryCpp11.cc. /tryCpp11 III. Other installation:-install on Ubuntu machine: References [3]-non-simple installation: References [4]-coexistence of multiple gcc versions: no 4. References [1] refer to the main installation steps http://www.cnblogs.com/ytjjyy/p/4008096.html note: the second half of this article solves the dynamic library method is very useful [2] make-j4 discussion http://stackoverflow.com/questions/15289250/make-j4-or-j8 [3] libgcc error http://argcv.com/articles/2946.c/comment-page-1 note: this article provides the installation method of gcc4.7 on Ubuntu12.04 [4] non-simple installation http://my.oschina.net/u/728245/blog/184550 another: the harder the graphic version, the luckier

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.