microsoft / git

A fork of Git containing Microsoft-specific patches.
http://git-scm.com/
Other
761 stars 92 forks source link

WSL: Ubuntu 20.04: Broken install for git 2.45.2.vfs.0.2 - missing libc dependency on clean install #672

Open kyle-rader-msft opened 2 months ago

kyle-rader-msft commented 2 months ago

Setup

From following the Ubuntu install direction from the README:

❯ curl -s https://api.github.com/repos/microsoft/git/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
| xargs -I 'url' curl -L -o msft-git.deb 'url'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 65.4M  100 65.4M    0     0  35.7M      0  0:00:01  0:00:01 --:--:-- 67.7M

~ took 2s
❯ debsig-verify msft-git.deb
debsig: Verified package from 'Microsoft Git public key' (Microsoft Git)

~
❯ sudo dpkg -i msft-git.deb
(Reading database ... 49467 files and directories currently installed.)
Preparing to unpack msft-git.deb ...
Unpacking microsoft-git (2.45.2.vfs.0.2) over (2.40.1.vfs.0.2) ...
Setting up microsoft-git (2.45.2.vfs.0.2) ...
Processing triggers for man-db (2.9.1-1) ...

~ took 8s
❯ which git
/usr/local/bin/git

~
❯ git --version
git: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by git)
git: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by git)
git: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by git)
$ git --version --build-options

** Same errror **

Are you using Scalar or VFS for Git?

No - I want to scalar clone, for sparse-checkout ad background maintenance.

If VFS for Git, then what version?

$ gvfs version

** NA **
$ cmd.exe /c ver

** Microsoft Windows [Version 10.0.22631.3880] **

❯ uname -a
Linux *** 5.15.153.1-microsoft-standard-WSL2 *** x86_64 x86_64 x86_64 GNU/Linux

Details

kyle-rader-msft commented 2 months ago

From some perusing, this problem is rooted in the fact that the latest git was likely compiled on Ubuntu or 22.04 against the newer glibc 2.32-2.34, and therfore won't run on Ubuntu 20.04 which doesn't have those newer glibc libraries by default nor are they installable via apt.

If the git build were to build against the older version, I think it would still be easy to use on Ubuntu 20.04.

kyle-rader-msft commented 2 months ago

If Ubuntu 20.04 is considered an "Older distibution" at this point, it would be helpful to note that up front in the install docs.

derrickstolee commented 2 months ago

If Ubuntu 20.04 is considered an "Older distibution" at this point, it would be helpful to note that up front in the install docs.

This should in fact be updated in the install docs. I believe that Ubuntu 20.04 is approaching end-of-life as far as GitHub Actions is concerned. The ubuntu-latest image is on 22.04 (we use this image), though I can't track down when it switched.

mjcheetham commented 2 months ago

though I can't track down when it switched.

ubuntu-latest, according to the public docs, switched to ubuntu-22.04 in https://github.com/actions/runner-images/commit/9c544f47011f3fb7f13ab122927f15939d950b49 (2022-15-15)

Part of https://github.com/actions/runner-images/issues/6399. Not sure when the actual image switch happened.

kyle-rader-msft commented 2 months ago

Thanks for the confirmation, I can open a PR today!

dscho commented 2 months ago

According to https://endoflife.date/ubuntu, Ubuntu 20.04 has only 8 more months of maintenance releases. So yes, I agree that we should upgrade the requirements to 22.04.