Can't install git

Dear friends I have installed new version of Ubuntu mate 18.04 on my laptop and I'm having problems installing git. It gives me error such as this:

"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."

I have searched for the answer on the web but without success. Please help fix it. Than you.

Please run the following command in a terminal:

sudo apt update then try to install git with sudo apt install git

If that works great. If not would would please post the output you get when you run sudo apt update and we will go from there.

Here is what I get from update:

"Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Err:2 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease
Temporary failure resolving 'ppa.launchpad.net'
Hit:3 http://ppa.launchpad.net/pdoes/ppa/ubuntu bionic InRelease
Reading package lists... Done
W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/bionic/InRelease Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead."

I fixed that here is another one:
Hit:1 http://ppa.launchpad.net/git-core/ppa/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://ppa.launchpad.net/pdoes/ppa/ubuntu bionic InRelease
Reading package lists... Done

So you added these PPA's to your new install.

Disable the PPA's and run sudo apt update then sudo apt install git and see if that is successful.

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package git 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 'git' has no installation candidate

Please see -

There is a problem with packages I know how to install it. Thanks.

Thanks @mdooley I'm a bit concerned because git-core should be provided by git and git is in the repos

It doesn't seem that security is showing up when he runs apt update could we see an output from cat /etc/apt/sources.list

> # deb cdrom:[Ubuntu-MATE 18.04.2 LTS _Bionic Beaver_ - Release amd64 (20190210)]/ bionic main multiverse restricted universe
> 
> # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
> # newer versions of the distribution.
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic main restricted
> 
> ## Major bug fix updates produced after the final release of the
> ## distribution.
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
> 
> ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
> ## team. Also, please note that software in universe WILL NOT receive any
> ## review or updates from the Ubuntu security team.
> 
> 
> 
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic universe
> 
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-updates universe
> 
> ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
> ## team, and may not be under a free licence. Please satisfy yourself as to 
> ## your rights to use the software. Also, please note that software in 
> ## multiverse WILL NOT receive any review or updates from the Ubuntu
> ## security team.
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic multiverse
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
> 
> ## N.B. software from this repository may not have been tested as
> ## extensively as that contained in the main release, although it includes
> ## newer versions of some applications which may provide useful features.
> ## Also, please note that software in backports WILL NOT receive any review
> ## or updates from the Ubuntu security team.
> 
> # deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
> 
> ## Uncomment the following two lines to add software from Canonical's
> ## 'partner' repository.
> ## This software is not part of Ubuntu, but is offered by Canonical and the
> ## respective vendors as a service to Ubuntu users.
> 
> # deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
> 
> #eb-src http://security.ubuntu.com/ubuntu bionic-security universe
> 
> # deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
> deb http://archive.ubuntu.com/ubuntu bionic universe

Fixed the security here is what I get when run git-svn:

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-svn : Depends: git (> 1:2.17.0) but it is not installable
Depends: git (< 1:2.17.0-.) but it is not installable
Depends: libsvn-perl but it is not going to be installed
Depends: libyaml-perl but it is not installable
E: Unable to correct problems, you have held broken packages.

In the posting of your /etc/apt/sources.list I do not see:
deb http://archive.ubuntu.com/ubuntu bionic main

Let's see if we can make software & Updates look like this and try to install:

Pick your closest mirror.

3 Likes

Thank you! Thank you! Thank you! xoxox that worked :smiley:
git version 2.18.0