2

How can I install git-svn given this apt-get error and seemingly-weird apt-cache status:

$ sudo apt-get install 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:1.7.10.4-.)
E: Unable to correct problems, you have held broken packages.

The apt-cache showpkg output:

$ apt-cache showpkg git-svn
Package: git-svn
Versions: 
1:1.9.1-1~bpo70+2 (/var/lib/apt/lists/ftp.debian.org_debian_dists_wheezy-backports_main_binary-amd64_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages
                  MD5: fe9279673cf6573640700aabf410ef25
 Description Language: en
                 File: /var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_i18n_Translation-en
                  MD5: fe9279673cf6573640700aabf410ef25

1:1.7.10.4-1+wheezy1 (/var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages)
 Description Language: 
                 File: /var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages
                  MD5: fe9279673cf6573640700aabf410ef25
 Description Language: en
                 File: /var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_i18n_Translation-en
                  MD5: fe9279673cf6573640700aabf410ef25


Reverse Depends: 
  git-doc,git-svn
  git-doc,git-svn
  git-all,git-svn
  git,git-svn
  moap,git-svn
  git-doc,git-svn
  git-all,git-svn
  git,git-svn
Dependencies: 
1:1.9.1-1~bpo70+2 - git (4 1:1.9.1) git (3 1:1.9.1-.) libsvn-perl (0 (null)) libyaml-perl (0 (null)) libterm-readkey-perl (0 (null)) git-doc (0 (null)) subversion (0 (null)) git (3 1:1.8.3~rc1-1.) git:i386 (3 1:1.8.3~rc1-1.) git (3 1:1.8.3~rc1-1.) git:i386 (3 1:1.8.3~rc1-1.) 
1:1.7.10.4-1+wheezy1 - git (4 1:1.7.10.4) git (3 1:1.7.10.4-.) libsvn-perl (16 (null)) libsvn-core-perl (0 (null)) libyaml-perl (0 (null)) libwww-perl (0 (null)) libterm-readkey-perl (0 (null)) git-doc (0 (null)) subversion (0 (null)) cogito (3 0.16rc2-0) cogito:i386 (3 0.16rc2-0) 
Provides: 
1:1.9.1-1~bpo70+2 - git-svn:i386 
1:1.7.10.4-1+wheezy1 - 
Reverse Provides: 

If I get the properties page of git-svn from synaptic it seems to show a "<" and a ">" for the same version of git, 1:1.7.10.4

I had to check via lsb-release because this isn't my only debian:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.2 (jessie)
Release:    8.2
Codename:   jessie

Here's apt-cache policy git

$ apt-cache policy git
git:
  Installed: 1:1.9.1-1~bpo70+2
  Candidate: 1:1.9.1-1~bpo70+2
  Version table:
 *** 1:1.9.1-1~bpo70+2 0
        100 http://ftp.debian.org/debian/ wheezy-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.7.10.4-1+wheezy1 0
        500 http://http.us.debian.org/debian/ wheezy/main amd64 Packages

Here's apt-cache policy git-svn

$ apt-cache policy git-svn
git-svn:
  Installed: (none)
  Candidate: 1:1.7.10.4-1+wheezy1
  Version table:
     1:1.9.1-1~bpo70+2 0
        100 http://ftp.debian.org/debian/ wheezy-backports/main amd64 Packages
     1:1.7.10.4-1+wheezy1 0
        500 http://http.us.debian.org/debian/ wheezy/main amd64 Packages

Although lsb-release as shown above shows "jessie" the sources.list only has reference to "wheezy". "apt-cache policy" has 68 references to "wheezy" but none to "jessie".

apt-get install -st as requested:

apt-get install -st wheezy-backports git-svn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  git-svn
0 upgraded, 1 newly installed, 0 to remove and 181 not upgraded.
Inst git-svn (1:1.9.1-1~bpo70+2 Debian Backports:/wheezy-backports [all])
Conf git-svn (1:1.9.1-1~bpo70+2 Debian Backports:/wheezy-backports [all])

apt-cache policy lsb-release as requested:

apt-cache policy lsb-release 
lsb-release:
  Installed: 4.1+Debian13+nmu1
  Candidate: 4.1+Debian13+nmu1
  Version table:
 *** 4.1+Debian13+nmu1 0
        100 /var/lib/dpkg/status
     4.1+Debian8+deb7u1 0
        500 http://http.us.debian.org/debian/ wheezy/main amd64 Packages

apt-cache policy (the whole thing)

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://security.debian.org/ wheezy/updates/non-free Translation-en
 500 http://security.debian.org/ wheezy/updates/main Translation-en
 500 http://security.debian.org/ wheezy/updates/contrib Translation-en
 500 http://security.debian.org/ wheezy/updates/non-free i386 Packages
     release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/contrib i386 Packages
     release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=contrib
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/main i386 Packages
     release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=main
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/non-free amd64 Packages
     release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/contrib amd64 Packages
     release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=contrib
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/main amd64 Packages
     release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=main
     origin security.debian.org
 500 http://ftp.debian.org/debian/ wheezy-backports/non-free Translation-en
 500 http://ftp.debian.org/debian/ wheezy-backports/main Translation-en
 500 http://ftp.debian.org/debian/ wheezy-backports/contrib Translation-en
 100 http://ftp.debian.org/debian/ wheezy-backports/non-free i386 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=non-free
     origin ftp.debian.org
 100 http://ftp.debian.org/debian/ wheezy-backports/contrib i386 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=contrib
     origin ftp.debian.org
 100 http://ftp.debian.org/debian/ wheezy-backports/main i386 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=main
     origin ftp.debian.org
 100 http://ftp.debian.org/debian/ wheezy-backports/non-free amd64 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=non-free
     origin ftp.debian.org
 100 http://ftp.debian.org/debian/ wheezy-backports/contrib amd64 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=contrib
     origin ftp.debian.org
 100 http://ftp.debian.org/debian/ wheezy-backports/main amd64 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=main
     origin ftp.debian.org
 500 http://download.virtualbox.org/virtualbox/debian/ wheezy/non-free i386 Packages
     release o=Oracle Corporation,n=wheezy,l=Oracle Corporation,c=non-free
     origin download.virtualbox.org
 500 http://download.virtualbox.org/virtualbox/debian/ wheezy/contrib i386 Packages
     release o=Oracle Corporation,n=wheezy,l=Oracle Corporation,c=contrib
     origin download.virtualbox.org
 500 http://download.virtualbox.org/virtualbox/debian/ wheezy/non-free amd64 Packages
     release o=Oracle Corporation,n=wheezy,l=Oracle Corporation,c=non-free
     origin download.virtualbox.org
 500 http://download.virtualbox.org/virtualbox/debian/ wheezy/contrib amd64 Packages
     release o=Oracle Corporation,n=wheezy,l=Oracle Corporation,c=contrib
     origin download.virtualbox.org
 500 http://ftp.us.debian.org/debian/ wheezy-updates/non-free Translation-en
 500 http://ftp.us.debian.org/debian/ wheezy-updates/main Translation-en
 500 http://ftp.us.debian.org/debian/ wheezy-updates/contrib Translation-en
 500 http://ftp.us.debian.org/debian/ wheezy-updates/non-free i386 Packages
     release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=non-free
     origin ftp.us.debian.org
 500 http://ftp.us.debian.org/debian/ wheezy-updates/contrib i386 Packages
     release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=contrib
     origin ftp.us.debian.org
 500 http://ftp.us.debian.org/debian/ wheezy-updates/main i386 Packages
     release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=main
     origin ftp.us.debian.org
 500 http://ftp.us.debian.org/debian/ wheezy-updates/non-free amd64 Packages
     release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=non-free
     origin ftp.us.debian.org
 500 http://ftp.us.debian.org/debian/ wheezy-updates/contrib amd64 Packages
     release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=contrib
     origin ftp.us.debian.org
 500 http://ftp.us.debian.org/debian/ wheezy-updates/main amd64 Packages
     release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=main
     origin ftp.us.debian.org
 500 http://http.us.debian.org/debian/ wheezy/non-free Translation-en
 500 http://http.us.debian.org/debian/ wheezy/main Translation-en
 500 http://http.us.debian.org/debian/ wheezy/contrib Translation-en
 500 http://http.us.debian.org/debian/ wheezy/non-free i386 Packages
     release v=7.9,o=Debian,a=oldstable,n=wheezy,l=Debian,c=non-free
     origin http.us.debian.org
 500 http://http.us.debian.org/debian/ wheezy/contrib i386 Packages
     release v=7.9,o=Debian,a=oldstable,n=wheezy,l=Debian,c=contrib
     origin http.us.debian.org
 500 http://http.us.debian.org/debian/ wheezy/main i386 Packages
     release v=7.9,o=Debian,a=oldstable,n=wheezy,l=Debian,c=main
     origin http.us.debian.org
 500 http://http.us.debian.org/debian/ wheezy/non-free amd64 Packages
     release v=7.9,o=Debian,a=oldstable,n=wheezy,l=Debian,c=non-free
     origin http.us.debian.org
 500 http://http.us.debian.org/debian/ wheezy/contrib amd64 Packages
     release v=7.9,o=Debian,a=oldstable,n=wheezy,l=Debian,c=contrib
     origin http.us.debian.org
 500 http://http.us.debian.org/debian/ wheezy/main amd64 Packages
     release v=7.9,o=Debian,a=oldstable,n=wheezy,l=Debian,c=main
     origin http.us.debian.org
Pinned packages:
  • apt-cache install -t wheezy-backports git-svn will probably work, but you haven't given much by way of details. Paste the output of apt-cache policy and apt-cache policy git, please. Also, are you running wheezy? – Faheem Mitha Nov 9 '15 at 22:37
  • apt-cache policy is 100 lines. The update of this box to jessie was a joint effort between myself and an IT guy. There are lots of references to wheezy in the "apt-cache policy" output, 68 out of 100 lines. – cardiff space man Nov 9 '15 at 22:53
  • 1
    You appear to be running a wheezy system where some packages have been upgraded to jessie. You should fully upgrade. Your problem is caused by a mix of versions. What's the output of apt-cache policy git-svn? And what do you have in /etc/apt/sources.list and /etc/apt/sources.list.d? – Gilles Nov 9 '15 at 22:58
  • There are zero references to jessie in /etc/apt/sources.list. It is full of references to wheezy. The /etc/apt/sources.list.d directory is present but empty. lsb-release's output is unambiguous but I wonder what else I could check to see which version I upgraded to. A comment in sources.list says I manually changed it in September. Unfortunately the number of Debian and Ubuntu CPUs and VMs I've been setting up since July has overwhelmed my organizational skills. – cardiff space man Nov 9 '15 at 23:10
  • 1
    @cardiffspaceman apt-get install -st wheezy-backports git-svn, not apt-cache. That was a typo. It's perfectly Ok to post apt-cache policy. Don't worry about the length. – Faheem Mitha Nov 11 '15 at 1:48
1

The command

apt-get install -t wheezy-backports git-svn

should install git-svn.

See the notes for the -t flag in man apt-get:

 -t, --target-release, --default-release
 This option controls the default input to the policy engine; 
 it creates a default pin at priority 990 using the specified
 release string. This overrides the general settings in 
 /etc/apt/preferences. Specifically pinned packages are not 
 affected by the value of this option. In short, this option 
 lets you have simple control over which distribution 
 packages will be retrieved from. Some common examples
 might be -t '2.1*', -t unstable or -t sid. Configuration 
 Item: APT::Default-Release; see also the apt_preferences(5)
 manual page.

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.