Score:3

How to downgrade Git from version 2.38.1 to 2.37.3 on Ubuntu 20.04

gd flag

How to downgrade Git from version 2.38.1 to 2.37.3 on Ubuntu 20.04?

This is needed because Atlassian Bitbucket Server 8.+ do not support latest version of Git. Please se at: https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html

I installed latest git wit adding this repo to source.list: ppa:git-core/ppa

Command apt policy git makes:

git:
Installed: 1:2.38.1-0ppa1~ubuntu20.04.1
Candidate: 1:2.38.1-0ppa1~ubuntu20.04.1
Version table:
*** 1:2.38.1-0ppa1~ubuntu20.04.1 500
    500 http://ppa.launchpad.net/git-core/ppa/ubuntu focal/main amd64 Packages
    100 /var/lib/dpkg/status
 1:2.25.1-1ubuntu3.6 500
    500 http://mirror.leaseweb.com/ubuntu focal-updates/main amd64 Packages
    500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
 1:2.25.1-1ubuntu3 500
    500 http://mirror.leaseweb.com/ubuntu focal/main amd64 Packages

After running a sudo apt install -f ./git-all_2.37.3-0ppa1~ubuntu20.04.1_all.deb I get error below:

The following packages have unmet dependencies:
git-all : Depends: git (< 1:2.37.3-.)
E: Unable to correct problems, you have held broken packages.

Thanks, Matti

Artur Meinild avatar
vn flag
Please explain why.
Matti Kiviharju avatar
gd flag
Because Atlassian Bitbucket 8.+ do not support latest version of Git. I try now to downgrade git but geting this error: git-compat-util.h:1504:10: fatal error: zlib.h: No such file or directory. I am also installed this successfully: https://www.systutorials.com/how-to-install-the-zlib-library-in-ubuntu/
Artur Meinild avatar
vn flag
How did you install Git 2.38 - did you use the `ppa:git-core/ppa`? Please include in your question.
Matti Kiviharju avatar
gd flag
It is now added to my question and yes I used: ppa:git-core/ppa
Artur Meinild avatar
vn flag
Yes, I see the issue now. The PPA continously upgrades GIT, and now Atlassian haven't "kept up". However, the old packages should still be there.
Artur Meinild avatar
vn flag
What's the output of `apt policy git`?
Artur Meinild avatar
vn flag
I thought the PPA kept the old versions also - but that wasn't the case, unfortunately..
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.