1

I'm attempting to install a piece of software but when I try to run bash install-deps (as per the readme) I get:

➜  torch git:(master) bash install-deps;
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                     
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]    
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                   
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]  
Hit:6 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease
Hit:7 http://repository.spotify.com stable InRelease                           
Hit:8 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:9 http://ppa.launchpad.net/plt/racket/ubuntu xenial InRelease       
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/main Sources [237 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [501 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [491 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [450 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [436 kB]
Fetched 2,422 kB in 1s (1,935 kB/s)                        
Reading package lists... Done
Updated successfully.
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:
 python-software-properties : Depends: python-apt (>= 0.6.20ubuntu16) but it is not going to be installed
                              Depends: python-pycurl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The issue is, when I try to go install python-apt like it suggests:

➜  torch git:(master) sudo apt-get install python-apt
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:
 python-apt : Depends: python:any (>= 2.7.5-5~)
E: Unable to correct problems, you have held broken packages.

I consider myself a linux noob, but python is installed by default, right? When I run whereis python it says:

➜  torch git:(master) whereis python
python: /usr/bin/python3.5m /usr/bin/python2.7 /usr/bin/python3.5 /usr/lib/python2.7 /usr/lib/python3.5 /etc/python /etc/python3.4 /etc/python2.7 /etc/python3.5 /usr/local/bin/python /usr/local/bin/python2.7 /usr/local/bin/python2.7-config /usr/local/lib/python2.7 /usr/local/lib/python3.5 /usr/include/python3.5m /usr/share/python

So python is definitely on my machine, in fact it seems like I have several different versions of it installed. Any suggestions for how to solve this? "apt-get install -f" doesn't seem to have any effect either.

EDIT: Here is the contents of the /var/lib/dpkg/status that Aaron Nelson requested:

➜  torch git:(master) cat /var/lib/dpkg/status | grep python-apt
Package: python-apt-common
Source: python-apt
Replaces: python-apt (<< 0.7.98+nmu1)
Breaks: python-apt (<< 0.7.98+nmu1)
Enhances: python-apt, python3-apt
Replaces: python-aptdaemon-gtk (<= 0.41+bzr580-0ubuntu1)
Source: python-apt
Replaces: python-apt (<< 0.7.98+nmu1)
Depends: python3 (<< 3.6), python3 (>= 3.5~), libapt-inst2.0 (>= 1.1~exp9), libapt-pkg5.0 (>= 1.1~exp9), libc6 (>= 2.14), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2), python-apt-common
Suggests: python3-apt-dbg, python-apt-doc
Breaks: python-apt (<< 0.7.98+nmu1)
Depends: gksu, python-apt, python-dbus, python-xdg, python-lxml, python-aptdaemon, python-aptdaemon.gtk3widgets, policykit-1-gnome | policykit-1-qt, python-defer, python-compizconfig, gir1.2-vte-2.90, gir1.2-gtk-3.0, gir1.2-gconf-2.0, gir1.2-notify-0.7, gir1.2-webkit-3.0, gir1.2-soup-2.4, dconf-gsettings-backend | gsettings-backend, gconf2 (>= 2.28.1-2), python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2)
Replaces: python-aptdaemon-gtk (<< 0.41+bzr582-0ubuntu1)
Conflicts: python-aptdaemon-gtk (<< 0.41+bzr582-0ubuntu1)
Suggests: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt
Replaces: python-aptdaemon.pkcompat
Conflicts: packagekit, python-aptdaemon.pkcompat
Depends: python:any (>= 2.7), iso-codes, app-install-data (>= 0.4.0), aptdaemon (>= 0.40), software-center-aptdaemon-plugins, humanity-icon-theme, gir1.2-glib-2.0 (>= 1.31), gir1.2-gtk-3.0, gir1.2-gmenu-3.0 (>= 3.1.5), gir1.2-webkit2-4.0, gvfs-backends, python-gi (>= 3.4.0-1ubuntu0.1), python-gi-cairo, python-xapian, python-apt (>= 0.8.3ubuntu4), python-aptdaemon (>= 0.40), python-aptdaemon.gtk3widgets, python-dbus, python-defer, python-lxml, policykit-1, policykit-1-gnome | policykit-1-kde, python-xdg, ubuntu-sso-client, python-piston-mini-client (>= 0.1+bzr29), oneconf (>= 0.2.6), python-oneconf (>= 0.3) | oneconf (<< 0.3), python-debtagshw
Depends: python3:any (>= 3.3.2-2~), python3, python3-gi, gir1.2-glib-2.0, python-apt-common (>= 0.9), python3-dbus, python3-software-properties (= 0.96.20.5), ca-certificates
1

Looks like the problem is broken packages. Or part of it anyway:

E: Unable to correct problems, you have held broken packages.

So to fix that try this:

$>sudo apt-get clean $>sudo apt-get update --fix-missing

4
  • clean did apparently nothing, and then doing update --fix-missing did a bunch, apparently, but didn't resolve the issue, it's still doing the exact same thing. Thanks for the help though. – Matt D Mar 31 '17 at 4:48
  • apt-get clean only cleans out the contentes of /var/apt/cache/ in case there is a bad package. Can you paste the portion of your/var/lib/dpkg/status that refers to the package you are trying to install? The file will be rather large so you may have to grep the file name: $> cat /var/lib/dpkg/status | grep <package name>. Sometimes removing this block of info from the file will correct the problem if you've done everything else to no avail. – Aaron Nelson Mar 31 '17 at 12:30
  • I've pasted that info in the post since as you said it was too long to fit in a comment. What do you mean by removing that info from the file? – Matt D Mar 31 '17 at 16:16
  • Well I admit I'm a little stumped at this point. It appears to be that your attempted install of python-apt, which will be the current release (python3.x), is causing conflict with what is installed on your system (0.7.98). There was a bug-release sometime back that I would imagine has been addressed but I can't find any real solution (see lists.debian.org/deity/2010/09/msg00259.html). Perhaps you should try to revert to the original version from your install and see if that fixes the broken deps, and then see if there is an upgrade argument for python-apt, instead of a new install. – Aaron Nelson Mar 31 '17 at 20:07

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.