LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unmet dependencies while installing a package in Ubuntu 16.04 (https://www.linuxquestions.org/questions/linux-software-2/unmet-dependencies-while-installing-a-package-in-ubuntu-16-04-a-4175605985/)

TheOrangeRemix 05-15-2017 11:11 AM

Unmet dependencies while installing a package in Ubuntu 16.04
 
I am trying to install an SSH server on my Ubuntu machine (currently running 16.04 in shell mode).

I get this error when installing this package or when I try to do a apt-get upgrade:

You might want to run 'apt-get -f install' to correct these:
openssh-server : Depends: openssh-sftp-server but it is not going to be installed
Recommends: ncurses-term but it is not going to be installed
Recommends: ssh-import-id but it is not going to be installed

signon-plugin-oauth2: Breaks: account-plugin-google (< 0.12) but 0.11+14:04.20140409.1-0ubuntu2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)


If I go ahead and do the apt-get -f install, it asks to me to install the account-plugin-google, to which I say yes, then it ives me this:

dpkg: error processing archive /var/cache/apt/archives/account-plugin-google_0.12+16.04.20160126-0ubuntu1_all.deb (--unpack): trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package kde-config-telepathy-accounts 4:15.12.3-0ubuntu1

Errors were encountered while processing:
/var/cache/apt/archives/account-plugin-google_0.12+16.04.20160126-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This error seems pretty cryptic to me. What can I do to resolve this broken dependency?

Thanks in advance.

hydrurga 05-15-2017 11:27 AM

Can you run inxi -r (install inxi if it isn't already installed) so that we can check your software sources.

Also paste the output from dpkg -l | grep -v '^ii' so if we can see if there are any partially installed packages in there.

Finally, paste the output from apt-get check to run a consistent check on your APT packages.

TheOrangeRemix 05-15-2017 11:45 AM

inxi is not currently installed and I cannot install it because it is complaining about unmet dependencies.

I see that there are lots of packages when I enter in dpkg -l | grep -v '^ii', but I cannot list them all here because I am using a different PC than the Ubuntu machine (shell enabled only so cannot copy and paste the output).

If I do an apt-get check, I get this:

The following packages have unmet dependencies:
signon-plugin-oauth2: Breaks: account-plugin-google (< 0.12) but 0.11+14.04.20140409.1-0ubuntu2 is installed

hydrurga 05-15-2017 11:49 AM

Can you not copy the output to a USB stick and transfer it across? Or upload it to the internet and download it to the other machine?

Ok, instead of inxi, try cat /etc/apt/sources.list{,.d/*}

TheOrangeRemix 05-15-2017 02:57 PM

output of sources.list:



# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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 http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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 http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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 http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security 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 http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # disabled on upgrade to xenial
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # disabled on upgrade to xenial
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
# deb http://ppa.launchpad.net/ubuntu-mozi...ity/ppa/ubuntu xenial main # disabled on upgrade to xenial
# deb-src http://ppa.launchpad.net/ubuntu-mozi...ity/ppa/ubuntu trusty main
deb http://ppa.launchpad.net/ubuntu-mozi...ity/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/ubuntu-mozi...ity/ppa/ubuntu trusty main

TheOrangeRemix 05-15-2017 02:58 PM

I should also mention that I recently upgraded from 14.04 and after upgrading, that is when all these dependency issues started popping up.

hydrurga 05-15-2017 03:29 PM

Thanks. Is that edited output from the command I listed (cat /etc/apt/sources.list{,.d/*}) or is it just sources.list? This is important because you may have further software sources in the sources.list.d directory that are affecting things.

Thanks for the additional info about the upgrade - that's important and should have been mentioned at the start. Did the upgrade appear to go well? More importantly, did you back up your system and data before you carried out the upgrade?

So, you'll notice that you have three references to Trusty at the end of sources.list of which two are commented out - you need to delete all of these as you're using Xenial now.

You also have two sources which were disabled due to the upgrade (Chrome and Mozilla). I see that you re-added the Chrome one (twice - delete one of them) but left the commented out Chrome ones - delete the latter as you have no further need for them. You may want to enable the Mozilla one eventually, but don't do that yet until the main problem is resolved. That section is a bit of a mess. It shouldn't have caused the main problems though, it just needs tidying up.

The rest of sources.list looks ok, although the commented out cdrom line at the start refers to Trusty. You might want to delete that altogether to keep things tidy.

Make the changes listed (backup the file first), get back about entries in sources.list.d, and then attempt sudo apt-get update (post any errors or warnings that arise from the latter).

Habitual 05-15-2017 03:47 PM

Quote:

Originally Posted by TheOrangeRemix (Post 5711073)
I should also mention that I recently upgraded from 14.04 and after upgrading, that is when all these dependency issues started popping up.

Can you tell us how this upgrade took place exactly?
Anything stand out about it? Who did it and how long ago?

Thank you.

Here's a tip:
Code:

do_stuff | nc terbmin.com 9999
eg:
Code:

cat /etc/apt/sources.list{,.d/*} | nc termbin.com 9999
spews
http://termbin.com/63asdfz0
Yours will be different on each invocation of "nc termbin.com 9999"

Might save some time and/or headaches.

TheOrangeRemix 05-15-2017 03:55 PM

The output that I posted earlier is from cat /etc/apt/sources.list{,.d/*}.

I made the changes that you suggested and removed all of the lines which contain "Trusty" in them.

I did a sudo apt-get update and the process completed without any errors.

When I did the upgrade from 14.04, it did not go smoothly. I found that I had to reconfigure my network interface cards and that I no longer had any X-Window environment. Every time I boot up, it shows the Kubuntu startup logo, then kicks me to the shell.

hydrurga 05-15-2017 03:59 PM

Ok, can you please paste the output from

dpkg -l | grep -v '^ii'

and

apt-get check

TheOrangeRemix 05-15-2017 05:05 PM

Output from dpkg is in here:

https://pastebin.com/s5T4Zpe8


Output from apt-get check:

Quote:

Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
signon-plugin-oauth2 : Breaks: account-plugin-google (< 0.12) but 0.11+14.04.20140409.1-0ubuntu2 is installed

hydrurga 05-15-2017 05:20 PM

I'm sorry to say but your system is in a bit of a mess - the upgrade appears not to have worked correctly.

In the output from dpkg -l, all those packages marked iU means that the package was installed but has not yet been configured (for info, rc means that a package was uninstalled but its configuration files remain - not a great problem).

Either you can stick with it and work your way through the list of packages and manually configure those that need it (this may work, it may not) using dpkg --configure package... (you could write a batch file in Bash to speed up the process), or (I would recommend) you back up your data and do a clean installation of Ubuntu 16.04.

It also takes me back to another previous question - did the upgrade appear to work when you ran it? Were there any warning or error messages?

Edit: I see that you edited your response to include info regarding that last question. To be honest, that confirms my advice - you need to do a fresh install of Ubuntu 16.04.

Shadow_7 05-15-2017 05:30 PM

You should be able to work around this. Although it would probably be quicker to do a fresh install of 16.04.

$ sudo apt-get -f install

And the usuals. Update the trusty deb at the bottom of your sources.list. Plus other things under /etc/apt/ as needed. But again a clean install would be quicker and more supportable. You can force install some things, and other trickery to get around issues like this. Like changing /var/lib/dpkg/status to say installed, and then installing the thing later. Or forcing installation of the .deb with dpkg directly (--force-all). None of which are best practices.

hydrurga 05-15-2017 05:44 PM

Quote:

Originally Posted by Shadow_7 (Post 5711145)
You should be able to work around this. Although it would probably be quicker to do a fresh install of 16.04.

$ sudo apt-get -f install

OP tried this, post #1.

TheOrangeRemix 05-15-2017 06:12 PM

Quote:

Originally Posted by hydrurga (Post 5711137)
I'm sorry to say but your system is in a bit of a mess - the upgrade appears not to have worked correctly.

In the output from dpkg -l, all those packages marked iU means that the package was installed but has not yet been configured (for info, rc means that a package was uninstalled but its configuration files remain - not a great problem).

Either you can stick with it and work your way through the list of packages and manually configure those that need it (this may work, it may not) using dpkg --configure package... (you could write a batch file in Bash to speed up the process), or (I would recommend) you back up your data and do a clean installation of Ubuntu 16.04.

It also takes me back to another previous question - did the upgrade appear to work when you ran it? Were there any warning or error messages?

Edit: I see that you edited your response to include info regarding that last question. To be honest, that confirms my advice - you need to do a fresh install of Ubuntu 16.04.

I was afraid of that. OK, I'll look into a clean installation eventually. Thanks for the help.


All times are GMT -5. The time now is 03:00 AM.