1

I'm having some problem with aptitude. I can't install anything -- I get an unmet dependancies error. I don't know how to interpret it.

yoshi@goOutMore:~/Dropbox/work/class_AMS261/summer17/sylabus$ sudo apt-get install fortune
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'fortune-mod' instead of 'fortune'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 fortune-mod : Depends: librecode0 (>= 3.6) but it is not going to be installed
               Recommends: fortunes-min but it is not going to be installed or
                           fortune-cookie-db
 linux-image-extra-4.13.0-37-generic : Depends: linux-image-4.13.0-37-generic but it is not going to be installed
 linux-image-generic-hwe-16.04 : Depends: linux-image-4.13.0-37-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

Can anyone interpret these? Also how do I resolve them? thanks!

  • Why do you title your question Aptitude Doesn't Work. I see no indication that you are using aptitude. – Organic Marble May 20 '18 at 20:00
2

@The Syndicate's diagnosis is right. Your whole package set is probably out of whack. I suspect you have different versions installed in this piecemeal way. Take your peddle off the gas when you are trying to figure out what's wrong.

Don't rush everything into one command. Do not try to do the automatic thing when there are malfunctions. Run "sudo apt-get update" (I'm old fashioned on the '-get' part, apt is what they suggest now, but I'm not changed over.) Review if it can talk to servers correctly. It may be looking for files on versions that you are no longer running. All of this is configured in /etc/apt/sources.d, most likely. Once you get the update to run, try next setp.

Find out how bad your update problem is going to be. Run

apt-get upgrade

DO NOT use -y, don't make this automatic. This will do nothing, it will review changes it wants to make. You need to know what things you have now are contradicting what you want to install. You may be able to run "apt-get install xyz" to get a particular package. The message about fortune is telling you that the package you are asking for does not exist by that name anymore. The error you got about other things required by fortune-mod was telling you it requires a newer or older package of something else but the automatic updating system was not pulling the version you needed. In presence of danger, try to understand what's going wrong.

The error you got happens when you surf around the net and pull in versions of packages that are not from the main repositories. You get newer versions of things that contradict what the main Ubuntu wants to do.

The request for "linux-image-4.13.0-37-generic" signals the fact that the apt upgrade will often refuse to fiddle with kernel packages. I'm using Ubuntu 18.04 after upgrading from 17.10, here are all of the linux-image files I have:

$ dpkg -l | grep linux-image
ii  linux-image-4.13.0-36-generic                               4.13.0-36.40                                amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-4.13.0-39-generic                               4.13.0-39.44                                amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-4.15.0-20-generic                               4.15.0-20.21                                amd64        Signed kernel image generic
ii  linux-image-extra-4.13.0-39-generic                         4.13.0-39.44                                amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-generic                                         4.15.0.20.23                                amd64        Generic Linux kernel image

The kernels 4.13 are old ones still floating about. If you are on current Ubuntu, your kernel would be 4.15.0

$ uname -a
Linux delllap-16 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Sometimes it is easier to work this out with the package manager named synaptic. Have you tried it? Its old school, but helpful. Maybe your system is no so far gone, if you can succeed with

apt-get install synaptic

then run

sudo synaptic

it gives you a more granular view of your situation.

  • 1
    I doubt they could install synaptic - they say that they can't install anything. – Organic Marble May 20 '18 at 19:59
  • ya I can't install synaptic. this was useful though, thanks! I think I need to reinstall linux itself. upgrade is giving me the same errors. – yoshi May 20 '18 at 20:55
0

It appears to require a different kernel. Try this.

sudo apt update && sudo apt upgrade -y

Then reboot your system, after that, do:

uname -a

Then post the output of that in your post to help us. Then try these commands:

sudo apt -f install
sudo apt install fortune

Also attempt to upgrade your version of Ubuntu to the latest version.

  • the first line gives the same error! – yoshi May 20 '18 at 19:03

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.