GO:GO对Linux内核版本要求

98 篇文章 2 订阅
43 篇文章 3 订阅

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

ReleaseGeneral Availabilityredhat-release Errata Date*Kernel Version
RHEL 8.32020-11-032020-11-03 RHBA-2020:44954.18.0-240
RHEL 8.22020-04-282020-04-28 RHBA-2020:17584.18.0-193
RHEL 8.12019-11-052019-11-05 RHBA-2019:35434.18.0-147
RHEL 82019-05-07-4.18.0-80
RHEL 7.92020-09-292020-09-29 RHBA-2020:38493.10.0-1160
RHEL 7.82020-03-312020-03-31 RHBA-2020:10333.10.0-1127
RHEL 7.72019-08-062019-08-06 RHBA-2019:23513.10.0-1062
RHEL 7.62018-10-302018-10-30 RHBA-2018:30143.10.0-957
RHEL 7.52018-04-102018-04-10 RHEA-2018:07003.10.0-862
RHEL 7.42017-07-312017-07-31 RHBA-2017:18503.10.0-693
RHEL 7.32016-11-032016-11-03 RHEA-2016-25443.10.0-514
RHEL 7.22015-11-192015-11-19 RHEA-2015:24613.10.0-327
RHEL 7.12015-03-052015-03-05 RHEA-2015:05243.10.0-229
RHEL 7.0 GA2014-06-09-3.10.0-123
RHEL 7.0 Beta2013-12-11-3.10.0-54.0.1
RHEL 6.102018-06-192018-06-19 RHBA-2018:18562.6.32-754
RHEL 6.92017-03-212017-03-21 RHSA-2017:08172.6.32-696
RHEL 6.82016-05-102016-05-10 RHSA-2016:0855-12.6.32-642
RHEL 6.72015-07-222015-07-22 RHEA-2015:14232.6.32-573
RHEL 6.62014-10-142014-10-13 RHEA-2014:16082.6.32-504
RHEL 6.52013-11-212013-11-20 RHSA-2013:1645-22.6.32-431
RHEL 6.42013-02-212013-02-21 RHSA-2013-04962.6.32-358
RHEL 6.32012-06-202012-06-19 RHSA-2012-08622.6.32-279
RHEL 6.22011-12-062011-12-06 RHEA-2011:17432.6.32-220
RHEL 6.12011-05-192011-05-19 RHEA-2011:05402.6.32-131.0.15
RHEL 6.02010-11-09-2.6.32-71
RHEL 5.112014-09-162014-09-16 RHEA-2014-12382.6.18-398
RHEL 5.102013-10-012013-09-30 RHEA-2013-13112.6.18-371
RHEL 5.92013-01-072013-01-07 RHEA-2013-00212.6.18-348
RHEL 5.82012-02-202012-02-20 RHEA-2012:03152.6.18-308
RHEL 5.72011-07-212011-07-20 RHEA-2011:09772.6.18-274
RHEL 5.62011-01-132011-01-12 RHEA-2011:00202.6.18-238
RHEL 5.52010-03-302010-03-30 RHEA-2010:02072.6.18-194
RHEL 5.42009-09-022009-09-02 RHEA-2009:14002.6.18-164
RHEL 5.32009-01-202009-01-20 RHEA-2009:01332.6.18-128
RHEL 5.22008-05-212008-05-20 RHEA-2008:04362.6.18-92
RHEL 5.12007-11-072007-11-07 RHEA-2007:08542.6.18-53
RHEL 5.02007-03-15-2.6.18-8
RHEL 4 Update 92011-02-162011-02-16 RHEA-2011:02512.6.9-100
RHEL 4 Update 82009-05-192009-05-18 RHEA-2009:10022.6.9-89
RHEL 4 Update 72008-07-292008-07-24 RHEA-2008:07692.6.9-78
RHEL 4 Update 62007-11-152007-11-15 RHBA-2007:08972.6.9-67
RHEL 4 Update 52007-05-012007-04-27 RHBA-2007:01962.6.9-55
RHEL 4 Update 42006-08-102006-08-10 RHBA-2006:06012.6.9-42
RHEL 4 Update 32006-03-122006-03-07 RHBA-2006:01492.6.9-34
RHEL 4 Update 22005-10-052005-10-05 RHEA-2005:7862.6.9-22
RHEL 4 Update 12005-06-082005-06-08 RHEA-2005:3182.6.9-11
RHEL 4 GA2005-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

ReleaseBased on RHEL Source (Version)Kernel Version
7 (1908)7.73.10.0-1062
7 (1810)7.63.10.0-957
7 (1804)7.53.10.0-862
7 (1708)7.43.10.0-693
7 (1611)7.33.10.0-514
7 (1511)7.23.10.0-327
7 (1503)7.13.10.0-229
7 (1406)7.0-
6.106.102.6.32-754
6.96.92.6.32-696
6.86.82.6.32-642
6.76.72.6.32-573
6.66.62.6.32-504
6.56.52.6.32-431
6.46.42.6.32-358
6.36.32.6.32-279
6.26.22.6.32-220
6.16.12.6.32-131.0.15
6.06.02.6.32-71
5.115.112.6.18-398
5.105.102.6.18-371
5.95.92.6.18-348
5.85.82.6.18-308
5.75.72.6.18-274
5.65.62.6.18-238
5.55.52.6.18-194
5.45.42.6.18-164
5.35.32.6.18-128
5.25.22.6.18-92
5.15.12.6.18-53
5.05.02.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/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值