Can't able to install Git

hey, i m using zorin 16 beta from last month,
but i just tried to install git ,
it said :-

milesdredd@milesdredd-hp-notebook:~$ sudo apt install 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.

what should i do?

my last hour bash history:-

1063 sudo apt install git
1064 sudo apt update
1065 sudo apt install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc
1066 node -version
1067 node --version
1068 npm --version
1069 npx --version
1070 sudo apt install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc
1071 git --version
1072 sudo apt --fix-missing update
1073 apt list --upgradable
1074 sudo apt update
1075 sudo apt install -f
1076 sudo apt install git
1077 sudo apt-get update --fix-missing
1078 sudo apt install git
1079 sudo apt --fix-broken install
1080 sudo apt install aptitude
1081 aptitude why git

and it details :-

Summary

milesdredd@milesdredd-hp-notebook:~$ sudo apt install git
[sudo] password for milesdredd:
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.
milesdredd@milesdredd-hp-notebook:~$ sudo apt update
Ign:1 Index of /stable/deb/ stable InRelease
Hit:2 Index of /libretro/stable/ubuntu focal InRelease
Err:3 Index of /ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Get:4 Index of /ubuntu focal-security InRelease [114 kB]
Err:5 Index of /stable/ focal InRelease
Temporary failure resolving 'packages.zorinos.com'
Hit:6 Index of /zorinos/apps/ubuntu focal InRelease
Err:7 Index of /stable/deb/ stable Release
Connection failed [IP: 151.139.106.118 80]
Hit:8 Index of /zorinos/drivers/ubuntu focal InRelease
Err:9 Index of /repos/code/ stable InRelease
Temporary failure resolving 'packages.microsoft.com'
Hit:10 Index of /zorinos/patches/ubuntu focal InRelease
Hit:11 Index of /zorinos/stable/ubuntu focal InRelease
Hit:12 Index of /patches/ focal InRelease
Hit:13 Index of /apps/ focal InRelease
Hit:14 Index of /drivers/ focal InRelease
Get:15 Index of /ubuntu focal-updates InRelease [114 kB]
Get:16 Index of /ubuntu focal-backports InRelease [101 kB]
Get:17 Index of /ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Get:18 Index of /ubuntu focal-updates/universe amd64 DEP-11 Metadata [332 kB]
Get:19 Index of /ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:20 Index of /ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.3 kB]
Get:4 Index of /ubuntu focal-security InRelease [114 kB]
Get:21 Index of /ubuntu focal-security/main amd64 DEP-11 Metadata [24.5 kB]
Get:22 Index of /ubuntu focal-security/universe amd64 DEP-11 Metadata [60.9 kB]
Get:23 Index of /ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Reading package lists... Done
E: The repository 'Index of /stable/deb/ stable Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
milesdredd@milesdredd-hp-notebook:~$ sudo apt install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zlib1g-dev' instead of 'libz-dev'
Package cmake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'cmake' has no installation candidate
milesdredd@milesdredd-hp-notebook:~$ node -version
node: bad option: -version
milesdredd@milesdredd-hp-notebook:~$ node --version
v10.19.0
milesdredd@milesdredd-hp-notebook:~$ npm --version
6.14.4
milesdredd@milesdredd-hp-notebook:~$ npx --version
6.14.4
milesdredd@milesdredd-hp-notebook:~$ sudo apt install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zlib1g-dev' instead of 'libz-dev'
Package cmake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'cmake' has no installation candidate
milesdredd@milesdredd-hp-notebook:~$ git --version

Command 'git' not found, but can be installed with:

sudo apt install git

milesdredd@milesdredd-hp-notebook:~$
milesdredd@milesdredd-hp-notebook:~$ sudo apt --fix-missing update
Get:1 Index of /ubuntu focal-updates InRelease [114 kB]
Hit:2 Index of /ubuntu focal-security InRelease
Get:3 Index of /ubuntu focal-backports InRelease [101 kB]
Hit:4 Index of /libretro/stable/ubuntu focal InRelease
Ign:5 Index of /stable/deb/ stable InRelease
Hit:6 Index of /zorinos/apps/ubuntu focal InRelease
Get:7 Index of /ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Get:8 Index of /repos/code/ stable InRelease [10.4 kB]
Hit:9 Index of /stable/ focal InRelease
Get:10 Index of /stable/deb/ stable Release [3,831 B]
Hit:11 Index of /zorinos/drivers/ubuntu focal InRelease
Get:12 Index of /ubuntu focal-updates/universe amd64 DEP-11 Metadata [332 kB]
Hit:13 Index of /patches/ focal InRelease
Get:14 Index of /ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:15 Index of /stable/deb/ stable Release.gpg [833 B]
Hit:16 Index of /ubuntu focal InRelease
Get:17 Index of /ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.3 kB]
Hit:18 Index of /apps/ focal InRelease
Hit:19 Index of /zorinos/patches/ubuntu focal InRelease
Hit:20 Index of /drivers/ focal InRelease
Get:21 Index of /repos/code/ stable/main armhf Packages [36.7 kB]
Hit:22 Index of /zorinos/stable/ubuntu focal InRelease
Get:23 Index of /repos/code/ stable/main arm64 Packages [36.8 kB]
Get:24 Index of /repos/code/ stable/main amd64 Packages [35.9 kB]
Get:25 Index of /stable/deb/ stable/main amd64 Packages [1,172 B]
Fetched 967 kB in 7s (135 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
milesdredd@milesdredd-hp-notebook:~$ apt list --upgradable
Listing... Done
code-insiders/stable 1.59.0-1626067901 amd64 [upgradable from: 1.59.0-1625810794]
N: There are 180 additional versions. Please use the '-a' switch to see them.
milesdredd@milesdredd-hp-notebook:~$ sudo apt update
Hit:1 Index of /ubuntu focal-updates InRelease
Hit:2 Index of /ubuntu focal-backports InRelease
Hit:3 Index of /ubuntu focal InRelease
Hit:4 Index of /stable/ focal InRelease
Hit:5 Index of /ubuntu focal-security InRelease
Ign:6 Index of /stable/deb/ stable InRelease
Hit:7 Index of /patches/ focal InRelease
Hit:8 Index of /stable/deb/ stable Release
Hit:10 Index of /apps/ focal InRelease
Hit:11 Index of /drivers/ focal InRelease
Hit:12 Index of /libretro/stable/ubuntu focal InRelease
Hit:13 Index of /repos/code/ stable InRelease
Hit:14 Index of /zorinos/apps/ubuntu focal InRelease
Hit:15 Index of /zorinos/drivers/ubuntu focal InRelease
Hit:16 Index of /zorinos/patches/ubuntu focal InRelease
Hit:17 Index of /zorinos/stable/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
milesdredd@milesdredd-hp-notebook:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
milesdredd@milesdredd-hp-notebook:~$ sudo apt install 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.
milesdredd@milesdredd-hp-notebook:~$ sudo apt-get update --fix-missing
Hit:1 Index of /repos/code/ stable InRelease
Hit:2 Index of /ubuntu focal-security InRelease
Hit:3 Index of /stable/ focal InRelease
Hit:4 Index of /ubuntu focal InRelease
Hit:5 Index of /patches/ focal InRelease
Ign:6 Index of /stable/deb/ stable InRelease
Hit:7 Index of /ubuntu focal-updates InRelease
Hit:8 Index of /apps/ focal InRelease
Hit:9 Index of /ubuntu focal-backports InRelease
Hit:10 Index of /stable/deb/ stable Release
Hit:11 Index of /drivers/ focal InRelease
Hit:13 Index of /libretro/stable/ubuntu focal InRelease
Hit:14 Index of /zorinos/apps/ubuntu focal InRelease
Hit:15 Index of /zorinos/drivers/ubuntu focal InRelease
Hit:16 Index of /zorinos/patches/ubuntu focal InRelease
Hit:17 Index of /zorinos/stable/ubuntu focal InRelease
Reading package lists... Done
milesdredd@milesdredd-hp-notebook:~$ sudo apt install 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.
milesdredd@milesdredd-hp-notebook:~$ sudo apt --fix-broken install
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontenWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43992 (synaptic)
Reading package lists... 0% Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
milesdredd@milesdredd-hp-notebook:~$ sudo apt install aptitude
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aptitude-common libcwidget4
Suggested packages:
aptitude-doc-en | aptitude-doc apt-xapian-index debtags tasksel
libcwidget-dev
Recommended packages:
libparse-debianchangelog-perl
The following NEW packages will be installed:
aptitude aptitude-common libcwidget4
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 3,341 kB of archives.
After this operation, 16.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 Index of /ubuntu focal/universe amd64 aptitude-common all 0.8.12-1ubuntu4 [1,711 kB]
Get:2 Index of /ubuntu focal/universe amd64 libcwidget4 amd64 0.5.18-5build1 [306 kB]
Get:3 Index of /ubuntu focal/universe amd64 aptitude amd64 0.8.12-1ubuntu4 [1,323 kB]
Fetched 3,341 kB in 10s (321 kB/s)
Selecting previously unselected package aptitude-common.
(Reading database ... 311665 files and directories currently installe
d.)
Preparing to unpack .../aptitude-common_0.8.12-1ubuntu4_all.deb ...
Unpacking aptitude-common (0.8.12-1ubuntu4) ...
Selecting previously unselected package libcwidget4:amd64.
Preparing to unpack .../libcwidget4_0.5.18-5build1_amd64.deb ...
Unpacking libcwidget4:amd64 (0.5.18-5build1) ...
Selecting previously unselected package aptitude.
Preparing to unpack .../aptitude_0.8.12-1ubuntu4_amd64.deb ...
Unpacking aptitude (0.8.12-1ubuntu4) ...
Setting up libcwidget4:amd64 (0.5.18-5build1) ...
Setting up aptitude-common (0.8.12-1ubuntu4) ...
Setting up aptitude (0.8.12-1ubuntu4) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/b
in/aptitude (aptitude) in auto mode
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
milesdredd@milesdredd-hp-notebook:~$ aptitude why git
i apt Suggests dpkg-dev (>= 1.17.2)
i A dpkg-dev Depends libdpkg-perl (= 1.19.7ubuntu3)
i A libdpkg-perl Suggests 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 Index of /ubuntu focal-updates InRelease
Hit:2 Index of /ubuntu focal InRelease
Hit:3 Index of /repos/code/ stable InRelease
Hit:4 Index of /ubuntu focal-backports InRelease
Hit:5 Index of /stable/ focal InRelease
Hit:6 Index of /libretro/stable/ubuntu focal InRelease
Hit:7 Index of /patches/ focal InRelease
Hit:8 Index of /zorinos/apps/ubuntu focal InRelease
Hit:9 Index of /apps/ focal InRelease
Hit:10 Index of /drivers/ focal InRelease
Hit:11 Index of /zorinos/drivers/ubuntu focal InRelease
Hit:12 Index of /zorinos/patches/ubuntu focal InRelease
Hit:13 Index of /zorinos/stable/ubuntu focal InRelease
Get:14 Index of /ubuntu focal-security InRelease [114 kB]
Ign:15 Index of /stable/deb/ stable InRelease
Hit:16 Index of /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 Index of /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

2 Likes

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