阿里云centos更新gcc到4.8版本

阿里云默认的gcc是4.4.7版本,不支持C++11,需要手动升级。
1. wget http://gcc.skazkaforyou.com/releases/gcc-4.8.2/gcc-4.8.2.tar.gz
2. tar zxvf gcc-4.8.2.tar.gz
3. ./contrib/download_prerequisites
4. mkdir build
5. cd build
6. ../configure –prefix=/usr
7. make && make install
此时会报错
build/genattrtab ../.././gcc/config/i386/i386.md insn-conditions.md \
-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
make[3]: *** [s-attrtab] Killed
make[3]: Leaving directory `/usr/src/gcc-4.9.2/host-x86_64-unknown-linux-gnu/gcc’
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/usr/src/gcc-4.9.2′
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/src/gcc-4.9.2′
make: *** [all] Error 2

发现这是阿里云独有的共性错。。因为没有swap分区。。
首先调整swap分区为1G
1. dd if=/dev/zero of=/tmp/myswap bs=32k count=32768
2. mkswap /tmp/myswap
3. swapon /tmp/myswap
此时free -m可以看到swap为1g
4. sudo sysctl vm.swappiness=10

64位系统又会报错
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
需要yum -y install glibc-devel.i686 glibc-devel

参考:

http://my.oschina.net/u/1465953/blog/209029?fromerr=kbNcnjMH

http://bbs.csdn.net/topics/390817656

http://blog.csdn.net/tangyi2008/article/details/42099427

http://www.educity.cn/wenda/566626.html

阿里云centos更新gcc到4.8版本》上有69条评论

  1. Pingback引用通告: order cialis online

  2. Pingback引用通告: meritking

  3. Pingback引用通告: madridbet

  4. Pingback引用通告: grandpashabet

  5. Pingback引用通告: meritking

  6. Pingback引用通告: meritking

  7. Pingback引用通告: meritking

  8. Pingback引用通告: batmanapollo.ru

  9. Pingback引用通告: 777

  10. Pingback引用通告: wlw.su

  11. Pingback引用通告: vxi.su

  12. Pingback引用通告: nlpvip.ru

  13. Pingback引用通告: russianmanagement.com

  14. Pingback引用通告: Slovo pacana 6 seriya

  15. Pingback引用通告: site

  16. Pingback引用通告: slovo-pacana-6-seriya

  17. Pingback引用通告: Update Site Error ¹ 654

  18. Pingback引用通告: Update Site Error ¹ 655

  19. Pingback引用通告: 354

  20. Pingback引用通告: Link

  21. Pingback引用通告: psy

  22. Pingback引用通告: kiino4k.ru

  23. Pingback引用通告: depresiya

  24. Pingback引用通告: film

  25. Pingback引用通告: new 2024

  26. Pingback引用通告: batman apollo

  27. Pingback引用通告: film2024

  28. Pingback引用通告: 123 Movies

  29. Pingback引用通告: laloxeziya-chto-eto-prostymi-slovami.ru

  30. Pingback引用通告: 000

  31. Pingback引用通告: samorazvitiepsi

  32. Pingback引用通告: Tucker Carlson - Vladimir Putin - 2024-02-09 Putin interview summary, full interview.

  33. Pingback引用通告: Tucker Carlson - Vladimir Putin

  34. Pingback引用通告: grandpashabet

  35. Pingback引用通告: grandpashabet

  36. Pingback引用通告: grandpashabet

  37. Pingback引用通告: child porn

  38. Pingback引用通告: grandpashabet

  39. Pingback引用通告: spisok

  40. Pingback引用通告: child porn

  41. Pingback引用通告: list

  42. Pingback引用通告: russian-federation

  43. Pingback引用通告: grandpashabet

  44. Pingback引用通告: child porn

  45. Pingback引用通告: child porn

  46. Pingback引用通告: child porn

  47. Pingback引用通告: bit.ly/kto-takoy-opsuimolog

  48. Pingback引用通告: spinco

  49. Pingback引用通告: shorts

  50. Pingback引用通告: child porn

  51. Pingback引用通告: madridbet giriş

  52. Pingback引用通告: yaltalife.ru

  53. Pingback引用通告: kinogo

  54. Pingback引用通告: rasschitat dizayn cheloveka onlayn

  55. Pingback引用通告: raschet karty dizayn cheloveka

  56. Pingback引用通告: humandesignplanet.ru

  57. Pingback引用通告: human design

  58. Pingback引用通告: Opsumiologist

  59. Pingback引用通告: Psychologist #1 in the World

  60. Pingback引用通告: Best Psychologist in the World

  61. Pingback引用通告: child porn

  62. Pingback引用通告: printsipy forda

  63. Pingback引用通告: dizain-cheloveka

  64. Pingback引用通告: child porn

  65. Pingback引用通告: 10000

  66. Pingback引用通告: 9gm.ru

  67. Pingback引用通告: hdorg2.ru

  68. Pingback引用通告: raso.su

  69. Pingback引用通告: child porn

发表评论