Can't able to install Git

Can you please run:

sudo apt-get update && sudo apt-get dist-upgrade && apt-get -f install

If that does not work, you may need to downgrade perl-base:

sudo apt install -f perl-base=5.22.1-9

Then run sudo apt install -y git

1 Like

i tried both command , but none of them worked :-

Summary

milesdredd@milesdredd-hp-notebook:~$ sudo apt-get update && sudo apt-get dist-upgrade && apt-get -f install
[sudo] password for milesdredd:
Hit:1 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://packages.microsoft.com/repos/code stable InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 https://packages.zorinos.com/stable focal InRelease
Hit:6 http://ppa.launchpad.net/libretro/stable/ubuntu focal InRelease
Hit:7 https://packages.zorinos.com/patches focal InRelease
Hit:8 http://ppa.launchpad.net/zorinos/apps/ubuntu focal InRelease
Hit:9 https://packages.zorinos.com/apps focal InRelease
Hit:10 https://packages.zorinos.com/drivers focal InRelease
Hit:11 http://ppa.launchpad.net/zorinos/drivers/ubuntu focal InRelease
Hit:12 http://ppa.launchpad.net/zorinos/patches/ubuntu focal InRelease
Hit:13 http://ppa.launchpad.net/zorinos/stable/ubuntu focal InRelease
Get:14 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Ign:15 http://repo.vivaldi.com/stable/deb stable InRelease
Hit:16 http://repo.vivaldi.com/stable/deb stable Release
Fetched 114 kB in 9s (12.6 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
code-insiders
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 77.0 MB of archives.
After this operation, 23.6 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://packages.microsoft.com/repos/code stable/main amd64 code-insiders amd64 1.59.0-1626067901 [77.0 MB]
20% [1 code-insiders 19.0 MB/77.0 MB 25%] 1,020 kB/s 56s^Fetched 77.0 MB in 60s (1,282 kB/s)
(Reading database ... 311878 files and directories currently installed.)
Preparing to unpack .../code-insiders_1.59.0-1626067901_amd64.deb ...
Unpacking code-insiders (1.59.0-1626067901) over (1.59.0-1625810794) ...
Setting up code-insiders (1.59.0-1626067901) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for shared-mime-info (1.15-1) ...
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Summary

milesdredd@milesdredd-hp-notebook:~$ sudo apt install -y git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
git : Depends: liberror-perl but it is not installable
E: Unable to correct problems, you have held broken packages.

Summary

milesdredd@milesdredd-hp-notebook:~$ sudo apt install -f perl-base=5.22.1-9
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '5.22.1-9' for 'perl-base' was not found

Shouldn't be seeing these if you used sudo.
Given what I have seen from your apt-update print out, your sources.list should be ok. But may need to check it later if the problem persists.

Installing git from repo should work fine, first time.
Can you try

sudo apt full-upgrade

sudo apt install git

sudo apt --fix-broken install

1 Like

this also not worked for me :disappointed:

Let's try installing liberror-perl from a .deb package first, then try installing git normally in the terminal again after:
http://archive.ubuntu.com/ubuntu/pool/main/libe/liberror-perl/liberror-perl_0.17029-1_all.deb

sudo apt install git

1 Like

also my softwere store not working well., it can't able to use internet ,
most of the time it's keep loading , anything i search on them , also my net speed is totally fine
you can see i hv uploaded screen recording on google drive :-
https://drive.google.com/file/d/1jBl1jsbei7c_kSrehN9P14Xal1S8J-b4/view?usp=sharing

how to install "deb" from terminal

Click the link and it will give a pop up offering the .deb package. You can either select to Open With Gdebi and run the installer, or you can save the package in Downloads folder, then Double-Click it to run the installer. Once installed, then try installing git again in the terminal.

Yes, your above details from running commands in terminal showed repeated failures in the updates, too.
And git should install from terminal normally without dependency errors.
You may try

pkill snap-store

pkill gnome-software

Reinitialize and test Software store

yes i did this , it takes me to the software store , and there store keeps loading

Ok, select to Open with Gdebi, instead.


only have these options

Heh...

sudo apt install gdebi

image
may be it is installed now?

1 Like

That'll do it. Ok... So, what happens with installing git now?

ok, i installed manually
and now git is installing

... but software store is still loading

Have you

pkill gnome-software

and then reopened it?

1 Like

yes , i did

Opening Software & Updates, first tab Zorin Software; Download From -is this set to Main Server?

yesss
image

finding best server ,
may be i have to change right?
image

which one ? i'm in india
image

I would highly recommend staying to "Main Server." The "best server (Local region)" option has never worked the way it should.

You are showing a variety of symptoms.
Git not installing properly (on my machine, there was no problem locating and installing liberror-perl), software store constantly loading and updating sources.list was dropping connection above, too.
Like git, cmake should have had no trouble installing, as well.
There seems to be a larger problem.

You may clean your apt cache, remove the ~/.local/share/gnome-software file if it exists and

These suggest packet loss or net drop.

This suggests that Synaptic Package Manager was open and running while also running apt/dpkg in terminal.

2 Likes

okayy

yes this i noticed ,this was my fault

but

how to clean this ? directly have to delete files ?


this??

i didn't get this , what do you mean by net drop?
sorry for lack of knowledge in me , but i really don't know about this

1 Like