GO:GO对Linux内核版本要求
1.结论
GO对Linux内核版本最低要求是 2.6.23,对应要求操作系统版本是:
- RHEL 6.0+
- CentOS 6.0+
即,不支持 (RHEL 和 CentOS) 的 (4.x or 5.x)。
The Go runtime requires Linux kernel version 2.6.23
https://github.com/golang/go/issues/9520
2.测试
GO版本:go version go1.13.6 linux/amd64
2.1.on Linux Kernel Release 2.6.18
[root@test1280 ~]# cat /etc/redhat-release
CentOS release 5.10 (Final)
[root@test1280 ~]# uname -r
2.6.18-371.el5
执行go报错:
[root@test1280 bin]# ./go version
-bash: ./go: cannot execute binary file
2.2.on Linux Kernel Release 2.6.32
[root@test1280 ~]# cat /etc/redhat-release
CentOS release 6.8 (Final)
[root@test1280 ~]# uname -r
2.6.32-642.el6.x86_64
执行go正常:
[root@test1280 bin]# ./go version
go version go1.13.6 linux/amd64
3.RHEL、CentOS 与 Linux 内核版本对应关系
3.1.RHEL & Linux Kernel
参考:https://access.redhat.com/articles/3078
Release | General Availability | redhat-release Errata Date* | Kernel Version |
---|---|---|---|
RHEL 8.3 | 2020-11-03 | 2020-11-03 RHBA-2020:4495 | 4.18.0-240 |
RHEL 8.2 | 2020-04-28 | 2020-04-28 RHBA-2020:1758 | 4.18.0-193 |
RHEL 8.1 | 2019-11-05 | 2019-11-05 RHBA-2019:3543 | 4.18.0-147 |
RHEL 8 | 2019-05-07 | - | 4.18.0-80 |
RHEL 7.9 | 2020-09-29 | 2020-09-29 RHBA-2020:3849 | 3.10.0-1160 |
RHEL 7.8 | 2020-03-31 | 2020-03-31 RHBA-2020:1033 | 3.10.0-1127 |
RHEL 7.7 | 2019-08-06 | 2019-08-06 RHBA-2019:2351 | 3.10.0-1062 |
RHEL 7.6 | 2018-10-30 | 2018-10-30 RHBA-2018:3014 | 3.10.0-957 |
RHEL 7.5 | 2018-04-10 | 2018-04-10 RHEA-2018:0700 | 3.10.0-862 |
RHEL 7.4 | 2017-07-31 | 2017-07-31 RHBA-2017:1850 | 3.10.0-693 |
RHEL 7.3 | 2016-11-03 | 2016-11-03 RHEA-2016-2544 | 3.10.0-514 |
RHEL 7.2 | 2015-11-19 | 2015-11-19 RHEA-2015:2461 | 3.10.0-327 |
RHEL 7.1 | 2015-03-05 | 2015-03-05 RHEA-2015:0524 | 3.10.0-229 |
RHEL 7.0 GA | 2014-06-09 | - | 3.10.0-123 |
RHEL 7.0 Beta | 2013-12-11 | - | 3.10.0-54.0.1 |
RHEL 6.10 | 2018-06-19 | 2018-06-19 RHBA-2018:1856 | 2.6.32-754 |
RHEL 6.9 | 2017-03-21 | 2017-03-21 RHSA-2017:0817 | 2.6.32-696 |
RHEL 6.8 | 2016-05-10 | 2016-05-10 RHSA-2016:0855-1 | 2.6.32-642 |
RHEL 6.7 | 2015-07-22 | 2015-07-22 RHEA-2015:1423 | 2.6.32-573 |
RHEL 6.6 | 2014-10-14 | 2014-10-13 RHEA-2014:1608 | 2.6.32-504 |
RHEL 6.5 | 2013-11-21 | 2013-11-20 RHSA-2013:1645-2 | 2.6.32-431 |
RHEL 6.4 | 2013-02-21 | 2013-02-21 RHSA-2013-0496 | 2.6.32-358 |
RHEL 6.3 | 2012-06-20 | 2012-06-19 RHSA-2012-0862 | 2.6.32-279 |
RHEL 6.2 | 2011-12-06 | 2011-12-06 RHEA-2011:1743 | 2.6.32-220 |
RHEL 6.1 | 2011-05-19 | 2011-05-19 RHEA-2011:0540 | 2.6.32-131.0.15 |
RHEL 6.0 | 2010-11-09 | - | 2.6.32-71 |
RHEL 5.11 | 2014-09-16 | 2014-09-16 RHEA-2014-1238 | 2.6.18-398 |
RHEL 5.10 | 2013-10-01 | 2013-09-30 RHEA-2013-1311 | 2.6.18-371 |
RHEL 5.9 | 2013-01-07 | 2013-01-07 RHEA-2013-0021 | 2.6.18-348 |
RHEL 5.8 | 2012-02-20 | 2012-02-20 RHEA-2012:0315 | 2.6.18-308 |
RHEL 5.7 | 2011-07-21 | 2011-07-20 RHEA-2011:0977 | 2.6.18-274 |
RHEL 5.6 | 2011-01-13 | 2011-01-12 RHEA-2011:0020 | 2.6.18-238 |
RHEL 5.5 | 2010-03-30 | 2010-03-30 RHEA-2010:0207 | 2.6.18-194 |
RHEL 5.4 | 2009-09-02 | 2009-09-02 RHEA-2009:1400 | 2.6.18-164 |
RHEL 5.3 | 2009-01-20 | 2009-01-20 RHEA-2009:0133 | 2.6.18-128 |
RHEL 5.2 | 2008-05-21 | 2008-05-20 RHEA-2008:0436 | 2.6.18-92 |
RHEL 5.1 | 2007-11-07 | 2007-11-07 RHEA-2007:0854 | 2.6.18-53 |
RHEL 5.0 | 2007-03-15 | - | 2.6.18-8 |
RHEL 4 Update 9 | 2011-02-16 | 2011-02-16 RHEA-2011:0251 | 2.6.9-100 |
RHEL 4 Update 8 | 2009-05-19 | 2009-05-18 RHEA-2009:1002 | 2.6.9-89 |
RHEL 4 Update 7 | 2008-07-29 | 2008-07-24 RHEA-2008:0769 | 2.6.9-78 |
RHEL 4 Update 6 | 2007-11-15 | 2007-11-15 RHBA-2007:0897 | 2.6.9-67 |
RHEL 4 Update 5 | 2007-05-01 | 2007-04-27 RHBA-2007:0196 | 2.6.9-55 |
RHEL 4 Update 4 | 2006-08-10 | 2006-08-10 RHBA-2006:0601 | 2.6.9-42 |
RHEL 4 Update 3 | 2006-03-12 | 2006-03-07 RHBA-2006:0149 | 2.6.9-34 |
RHEL 4 Update 2 | 2005-10-05 | 2005-10-05 RHEA-2005:786 | 2.6.9-22 |
RHEL 4 Update 1 | 2005-06-08 | 2005-06-08 RHEA-2005:318 | 2.6.9-11 |
RHEL 4 GA | 2005-02-15 | - | 2.6.9-5 |
…… |
从上表可以看到,RHEL 6.0+版本的操作系统,使用的内核版本均大于2.6.23。
3.2.CentOS & Linux Kernel
通常来说,CentOS 是 RHEL 的加强版,同版本的 CentOS 与 RHEL 的 Linux Kernel 版本相同。
CentOS 和 RHEL 版本对应关系:(并联查 RHEL 与 Linux Kernel 对应关系)
参考:https://wiki.centos.org/Download
Release | Based on RHEL Source (Version) | Kernel Version |
---|---|---|
7 (1908) | 7.7 | 3.10.0-1062 |
7 (1810) | 7.6 | 3.10.0-957 |
7 (1804) | 7.5 | 3.10.0-862 |
7 (1708) | 7.4 | 3.10.0-693 |
7 (1611) | 7.3 | 3.10.0-514 |
7 (1511) | 7.2 | 3.10.0-327 |
7 (1503) | 7.1 | 3.10.0-229 |
7 (1406) | 7.0 | - |
6.10 | 6.10 | 2.6.32-754 |
6.9 | 6.9 | 2.6.32-696 |
6.8 | 6.8 | 2.6.32-642 |
6.7 | 6.7 | 2.6.32-573 |
6.6 | 6.6 | 2.6.32-504 |
6.5 | 6.5 | 2.6.32-431 |
6.4 | 6.4 | 2.6.32-358 |
6.3 | 6.3 | 2.6.32-279 |
6.2 | 6.2 | 2.6.32-220 |
6.1 | 6.1 | 2.6.32-131.0.15 |
6.0 | 6.0 | 2.6.32-71 |
5.11 | 5.11 | 2.6.18-398 |
5.10 | 5.10 | 2.6.18-371 |
5.9 | 5.9 | 2.6.18-348 |
5.8 | 5.8 | 2.6.18-308 |
5.7 | 5.7 | 2.6.18-274 |
5.6 | 5.6 | 2.6.18-238 |
5.5 | 5.5 | 2.6.18-194 |
5.4 | 5.4 | 2.6.18-164 |
5.3 | 5.3 | 2.6.18-128 |
5.2 | 5.2 | 2.6.18-92 |
5.1 | 5.1 | 2.6.18-53 |
5.0 | 5.0 | 2.6.18-8 |
…… |
4.参考
- https://github.com/golang/go/issues/9520
- https://studygolang.com/articles/20696
- https://access.redhat.com/articles/3078
- https://wiki.centos.org/Download
- https://blog.csdn.net/t1506376703/article/details/97618900
- https://blog.csdn.net/qq_38814358/article/details/96116163
- https://vault.centos.org/