0

I am not able to install git on Ubuntu 12.10. I have tried adding the git package repository manually to software sources still I am getting the following error while installing git-core on Ubuntu 12.10

$ sudo apt-get install git-core
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-core : Depends: git (> 1:1.7.0.2)
E: Unable to correct problems, you have held broken packages.

Tried ti install git too, but now this error is being displayed

$ sudo apt-get install git
[sudo] password for vishak: 
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.
  • I also updated the repositories, by running sudo apt-get update, but still the error persists. – Vishak Apr 22 '13 at 15:11
1

you don't need to add any repositories to your sources.list as git already comes with any version of ubuntu since hardy.

git-core used to be the old name for the central package, and has been replaced by the git package since oneric.

finally, aptitude usually does a better job when it comes to resolving dependencies, so you might use it instead (and from the cmdline, the syntax is almost identical to that of apt-get)

if you don't have aptitude installed, do so by running

 $ sudo apt-get install aptitude

and then install git:

 $ sudo aptitude install git

EDIT after removing any extranous lines from your sources.list, you should refresh your package cache.

$ sudo aptitude update

if aptitude cannot find liberror-perl which has been in ubuntu since hardy (and never changed since then), you probably have broken your sources.list file.

  • I tried that too but getting the following error! :( – Vishak Apr 22 '13 at 15:22
  • $sudo apt-get 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 – Vishak Apr 22 '13 at 15:23
  • better update your question (by adding the new information rather than replacing the old info with the new one); anyhow i'll update my answer – umläute Apr 22 '13 at 15:32
  • sudo aptitude update [sudo] password for vishak: sudo: aptitude: command not found – Vishak Apr 22 '13 at 15:39
  • 1
    you just need to change the 'download from' server from ubuntu s/w center... your regional mirror is the problem – Firdous Jan 24 '15 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.