mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-13 11:31:28 -05:00
Linux 2.6.26-2-amd64 : FATAL: kernel too old #1861
Closed
opened 2025-11-02 04:15:28 -06:00 by GiteaMirror
·
44 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v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.3.3
v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
status/blocked
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#1861
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @r10r on GitHub (Jun 5, 2018).
[x]):Description
~# ./gitea-1.4.2-linux-amd64 -h
FATAL: kernel too old
Segmentation fault
~# file gitea-1.4.2-linux-amd64
gitea-1.4.2-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, from '8@1600(%rax) 8@1608(%rax)', not stripped
...
I expect that gitea has Go's minimum requirements.
Otherwise it would be nice to add a note somewhere that kernel must be >= 2.6.32 https://github.com/golang/go/wiki/MinimumRequirements#linux
@lunny commented on GitHub (Jun 5, 2018):
Gitea it doesn't ask special linux kernel version. I think that's Go's requirement. And maybe the golang's wiki is not updated?
@r10r commented on GitHub (Jun 5, 2018):
That's not correct. It's because the binary is statically linked, for GNU/Linux 2.6.32
Other go binaries work fine on this machine.
@lafriks commented on GitHub (Jun 5, 2018):
That depends on your go version, older go versions had lower kernel requirements, check your go version
@r10r commented on GitHub (Jun 5, 2018):
I used the precompiled version form the download page and didn't compile gitea myself.
@daviian commented on GitHub (Jun 5, 2018):
@r10r That's what he actually meant. Since in your example you compile code yourself with your installed go version, which may be older than the one we use to build the binary.
@r10r commented on GitHub (Jun 5, 2018):
Rubens-MacBook-Pro:~ ruben$ go version
go version go1.10.1 darwin/amd64
@r10r commented on GitHub (Jun 5, 2018):
What version did you use?
@daviian commented on GitHub (Jun 5, 2018):
we use 1.10.2, see
2fcd9b69b7/Dockerfile (L4)@r10r commented on GitHub (Jun 5, 2018):
I've installed 1.10.2, recompiled the example and it still works ...
@r10r commented on GitHub (Jun 5, 2018):
Apart from that the Makefile build target does not cross-compile on OSX.
When I build it without the Makefile it builds:
but raises another error on the server:
@lafriks commented on GitHub (Jun 5, 2018):
you need to build using
GOOS=linux GOARCH=amd64 go build -tags='bindata' -o gitea@lunny commented on GitHub (Jun 5, 2018):
Your gopath haven't set up correctly.
go buildwill not package the resources, you have to copy the resources to the deployment machine.@lunny commented on GitHub (Jun 5, 2018):
You can find how to build from source, see https://docs.gitea.io/en-us/install-from-source/
@gerricom commented on GitHub (Mar 28, 2019):
Just want to let you know, that I get this message when updating our gitea 1.7.4 to 1.7.5 on one of our CentOS6 machines.
To us this is not very dramatic as we intend to migrate to a more recent OS, but maybe some other users are affected too...
@RiverVanRain commented on GitHub (Mar 28, 2019):
@gerricom Confirmed. We were forced to downgrade to gitea 1.7.4.
@techknowlogick commented on GitHub (Mar 29, 2019):
Yes, the change is that the docker image we use to cross-compile our binaries has been updated from Ubuntu 14.04 to 18.04 as 14.04 is End of life in a few days.
However now that we have updated to use go modules, compiling from source yourself is much easier.
You can git clone this repo and run
GO111MODULE=on GOOS=linux GOARCH=amd64 go build -tags='bindata' -o gitea(assuming you have go 1.11.x or 1.12.x)@ghost commented on GitHub (Mar 29, 2019):
I have this issue with Gitea 1.7.5; had to go to 1.7.4. Kernel version is 2.6.32 (because OpenVZ sucks)
@vintprox commented on GitHub (Apr 4, 2019):
thank goodness. that one was tough
@zeripath commented on GitHub (Apr 5, 2019):
Peeps, compiling from source isn't too difficult. Staying on 1.7.4 is not a good idea - our development is pretty rapid and although we've patched a lot of security bugs since the split with gogs, there was one in 1.7.4 that we've fixed in 1.7.5.
@techknowlogick is there no way we can reduce the kernel requirements on the build?
@vintprox commented on GitHub (Apr 5, 2019):
@zeripath Just this process wasn't fluent enough, I personally got some weird errors without solution in World Wide Web, which were not related to the lack of build-essential tools. IMO if existing core is not accepted and build is barely successful on OpenVZ with Ubuntu 16.04, I have to stick to 1.7.4 binary... or switch VPS provider maybe.
@CMiksche commented on GitHub (Apr 5, 2019):
Same problem with the binary here - i think quite many users want to run gitea on an OpenVZ vServer ...
I've getting the following erros by compiling from source with both
GO111MODULE=on GOOS=linux GOARCH=amd64 go build -tags='bindata' -o giteaandTAGS="bindata" make generate build:I am usually not compiling things - maybe someone can give me a hint what i can do to solve this?
@sh4nks commented on GitHub (Apr 5, 2019):
I have just compiled gitea myself. There are instructions on the website on how to do this.
@zeripath commented on GitHub (Apr 6, 2019):
@Cmiksche your errors appear very odd and suggest to me that you have a very old version of go.
What is your version of go? Just get the latest you can but at least go 1.9
Make sure you set the GOPATH and add its /bin to your PATH
I presume you obtained your Gitea source code using the go command:
For building the simplest and recommended thing to do:
If you really don't need sqlite you can drop those tags. If you don't drop em you'll need a GCC to build the sqlite library.
@zeripath commented on GitHub (Apr 6, 2019):
@vintprox if you would like to suggest changes to https://docs.gitea.io/en-us/install-from-source/ we're happy to improve it, but it does say about tags and releases.
What were your strange errors? Master is on the whole relatively stable - apart from around database schema changes necessitating migration script changes. (These unfortunately tend to break a few users because real life data is so much more complex so it's almost impossible to completely get the script right first time and a few users always have a bumpy ride till we get it right.)
@CMiksche commented on GitHub (Apr 7, 2019):
Thank you. Exactly that was my problem (used Go Version 1.7.4)
@zeripath commented on GitHub (Apr 7, 2019):
@Cmiksche glad that fixed it for you.
I guess we could try to put something in to throw an understandable error if you try to compile with a go that's too old. I think this is relatively easy to add if you compile with make but it's probably preferable to get go build to barf itself.
@maikgreubel commented on GitHub (Apr 14, 2019):
Tried to build from source using instructions from https://github.com/go-gitea/gitea/issues/4131#issuecomment-477847499 resulted in
Go version 1.11.5
Git version 2.3.6
@zeripath commented on GitHub (Apr 14, 2019):
Why couldn't you use make ? I really did spend quite a bit of time rewriting the instructions in https://docs.gitea.io/en-us/install-from-source/ to make them as foolproof as possible.
You wouldn't have to download any of these if you'd just used the make file.
If you really don't want to use the make file then you should add a
-mod=vendorto that build line.If you don't want to do that then you'll just have to try again. The failure you're getting is not our fault, it's with googlesource.com . If trying again doesn't work you may have to fund where the partially broken partially downloaded repo golang.org/x/net has been put and just delete it, then try again. Possibly it's in the GOPATH but I don't know.
@maikgreubel commented on GitHub (Apr 14, 2019):
Hello @zeripath,
I downloaded nothing manually, just the source file of release 1.7.6, unpacked it, cd'ed into gitea-1.7.6 and executed the go build command. Nothing more, but I tried it multiple times because my first intention was that there was an incomplete git pull or something like that.
I tried it now using make but result is still the same:
Removing the directory ~/go recursively seems also not solving the problem. :(
Everything I try results in the same problematic package.
I will now give the git repository a try, but I think a build against a release tarball should be repeatable (in case of all requirements still exists) all of the time.
BTW: I never told that there is a problem in your source or configs. I just want to ask for help :)
@zeripath commented on GitHub (Apr 15, 2019):
Sorry if I sounded annoyed.
Delete
/root/go/pkg/mod/cache/(Which implies you're building as root? Please don't do so much as root it's a really bad idea!)
@maikgreubel commented on GitHub (Apr 20, 2019):
Hello again and sorry for late feedback.
It took some sparetime to update git to a newer version because the previous was a little bit too old and I thought it could be a reason of build errors. Now I have installed 2.21.0 \o/
Then I switched from zip file to git repo with branch release/v1.7 and gave it a try.
And I don't know whether or not it had some influence on it, but the error concerning golang.org/x/net has been gone.
But there is still an issue which prevents from finishing build successful:
Is it correct, that the following line causes the problem?
I tried it two and three times with and without removing ~/go directory but error is still the same. If I add the argument -mod=vendor I'm getting always reproducable
Do you have a hint, what I'm doing wrong?
BR
@zeripath commented on GitHub (Apr 20, 2019):
OK,
Let's do this completely by the book. Stop downloading zips and tar.gz. Read: https://docs.gitea.io/en-us/install-from-source/ . Ensure that
$GOPATHis set - probably$HOME/go. Ensure that$GOPATH/binis on the$PATH.Go is very opinionated on where it expects things to be. Yes with modules you should be able to download outside of the
$GOPATHbut let's stick with what we know works for the moment.@maikgreubel commented on GitHub (Apr 20, 2019):
Thank you for support :)
First try resulted in error, that go-bindata was not found:
I have an RPM package of go installed which was available in repository. That package does not provide the binary. So I installed go-bindata.x86_64 and executed make again. This resulted in obviously too old go-bindata binary:
Same error for modules/public/public.go:20 and modules/templates/templates.go:7
I have version
I will try to update the go-bindata and give feedback asap.
@bwenrich commented on GitHub (Apr 24, 2019):
I had the same problem (too old kernel 2.6.32.x on Ubuntu 16.04 LTS on OpenVZ). While my disappointment is with my OpenVZ host (not Gitea) I was able to build from source based on the documentation steps.
If I understand, the requirements are golang >=1.9.x, go-bindata (not sure what version), and make.
I am very new to Gitea, so welcome corrections if I have overlooked something in these steps
@maikgreubel commented on GitHub (Apr 24, 2019):
I updated go-bindata to 3.1.0 and now it builds successfully.
Thank you.
@PlanetRenox-zz commented on GitHub (May 29, 2019):
So I installed Gitea 1.7.4 some time ago using this guide.
Now when trying to upgrade to 1.8.1 I get the "FATAL: kernel too old" error.
Does this mean I need to reset the server and build from source all over again? Or can this be fixed without having to go through all that again?
@maikgreubel commented on GitHub (May 29, 2019):
@PlanetRenox, to give you a valid answer, you need to provide more information about your system. Which distribution, which kernel do you use?
Which output you get by executing
Long story short: The build executable by the gitea team does not support linux kernel with version 2.6. In case you use such a kernel with 64bit I could provide you a pre-built executable.
@PlanetRenox-zz commented on GitHub (May 29, 2019):
@maikgreubel Using the guide I linked I basically built Gitea 1.7.4 from binary on CentOS 7
Here is my output for
uname -aLinux git 2.6.32-042stab134.7 #1 SMP Tue Nov 27 18:35:26 MSK 2018 x86_64 x86_64 x86_64 GNU/LinuxWhat should I do? If you provide me a pre-built executable please also let me know how to not lose user/repo data that is already on the server. (db type: sqlite3)
@maikgreubel commented on GitHub (May 30, 2019):
@PlanetRenox, you can try https://packages.nkey.de/gitea/gitea-1.8.2-amd64-linux26.xz
HTH
@zeripath commented on GitHub (May 30, 2019):
@techknowlogick could we do additional builds on a centos docker?
@PlanetRenox-zz commented on GitHub (Jun 1, 2019):
@maikgreubel it worked. gj
How did you figure that out? What do I do for future updates?
@maikgreubel commented on GitHub (Jun 1, 2019):
@PlanetRenox, you are welcome :)
I can only direct you to the question I asked and the answers I got in this thread here, to answer your question how I figured it out ;)
@zeripath asked the question to support the old kernel 2.6 using docker builds. This would be a great solution. In any other case each user of us will need to compile the stuff by itself. Or someone in the community is willing to do it in future and provide a built binary. So it depends on what the result of discussion to use docker build will be. A community member provided binary will be fine but it is a not so optimal solution from security and trust point of view.
@lunny commented on GitHub (Jun 2, 2019):
I removed the go-bindata dependent on https://github.com/go-gitea/gitea/pull/7080
I have created a repository to compile go repository with gcc. It's based on a recent centos image, see https://gitea.com/lunny/centos-go and https://cloud.docker.com/u/lunny/repository/docker/lunny/centos-go
@lunny commented on GitHub (Sep 3, 2020):
I will close this issue and please feel free to reopen it.