Cannot install dependencies - linux

I'm trying to install (ex.) nasm.
sudo apt-get install nasm
After this I get an error message:
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic but it is not going to be installed
linux-image-extra-4.4.0-72-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
If I run: sudo apt -f install
What I get is this:
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb
/var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt-get clean
or
sudo apt-get autoclean
or
If you're on Ubuntu, goto Software Sources > Other Software
and uncheck unnecessary ppa's.
screenshot

Related

How can I fix the error =>E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. While installing MongoDB

I am trying to install MongoDb in Ubuntu 20.04.4 LTS
I am following the steps in the documentation here
But when I execute the command in STEP 4
I am getting the error as shown in the screenshot below.
venki#ubuntu:~$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
mongodb-org is already the newest version (6.0.0).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org-database : Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
venki#ubuntu:~$
venki#ubuntu:~$
venki#ubuntu:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
mongodb-org-database : Depends: mongodb-org-server but it is not installed
Depends: mongodb-org-mongos but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
venki#ubuntu:~$ sudo dpkg --configure -a
venki#ubuntu:~$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
mongodb-org is already the newest version (6.0.0).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org-database : Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
venki#ubuntu:~$ sudo dpkg --remove mongodb-org-shell
I tried uninstalling following the steps in official documentation here
And tried to start installing from STEP 1 again. But the error still stays.
I also tried to make this work by executing the following commands :
sudo dpkg --configure -a
sudo dpkg --remove mongodb-org-database-tools-extra
sudo dpkg --remove mongodb-org-shell
But this does not seem to work either.
Can someone please help me out here ?

libc6:amd64 current status 'half-install' POP-os

I am running POP-os on my pc. Yesterday I ran sudo apt upgrade but got the following error
The following packages have unmet dependencies.
locales : Depends: libc-bin (> 2.32)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)
so I ran sudo apt --fix-broken install and got
package libc6:amd64 is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
so tried sudo apt install libc6:amd64 and got the libc-bin error as before so tried sudo apt install libc-bin and got the following
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
locales : Depends: libc-bin (> 2.32)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I feel like I'm going round in circles
$ sudo dpkg -i /var/cache/apt/archives/libc6_2.33*
$ sudo dpkg -i /var/cache/apt/archives/libc-bin_2.33-0ubuntu5_amd64.deb
$ sudo dpkg -i /var/cache/apt/archives/libc-dev-bin_2.33-0ubuntu5_amd64.deb
$ sudo apt --fix-broken install
might have worked as it worked for me.
im new in stackoverflow, but i want to add to the responses that they are successfull and corrects answers, and they did work for me, in mi case i tried with this one:
$ sudo dpkg -i /var/cache/apt/archives/libc6_2.33*
but before i replace this part "libc6_2.33*" for this one "libc6_2.31-0ubuntu9.9_amd64.deb", so finally y put in terminal::
$ sudo dpkg -i /var/cache/apt/archives/libc6_2.31-0ubuntu9.9_amd64.deb
and that work for me, because i search in the folder that directory and find that lib file, hope work for you! good luck

How to forcely uninstall mssql from ubuntu 16.04 system

I have tried following commands:
sudo apt-get remove mssql-server
sudo apt-get -f
but I get the following error message:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.2.0.0) but it is not going to be installed
Depends: msodbcsql17 (< 17.3.0.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
kindly tell some working solution
Use sudo apt-get -f install to fix your missing dependencies, then execute sudo apt-get remove mssql-server to uninstall the server.
You can also delete the data directory using sudo rm -rf /var/opt/mssql/. (be extremely careful every time you use sudo rm, you could erase your entire hard drive if you specify the wrong path!)

Raspberry Pi Libc corrupted

My Raspberry Pi will not install anything anymore, as it keeps on complaining about a half-installed libc6. For example, when I try to install g++ 4.7:
pi#raspberrypi ~/workspace $ sudo apt-get install g++-4.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
g++-4.7 : Depends: libstdc++6-4.7-dev (= 4.7.2-5+rpi1) but it is not going to be installed
libkrb5-3 : Depends: libc6 (>= 2.16) but 2.13-38+rpi2+deb7u3 is to be installed
locales : Depends: glibc-2.19-1 but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
So, then I run sudo apt-get install -f, and it gives me this error:
dpkg: error processing libc6:armhf (--configure):
package libc6:armhf is not ready for configuration
cannot configure (current status `half-installed')
Errors were encountered while processing:
libc6:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)
What can I do about this?
Looks like you added wrong repository to your /etc/apt/sources.list or /etc/apt/sources.list.d/*,
look at
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
there should be no debian repos in sources lists, also check the raspbian version, looks like you're on "wheezy", so remove "sid" or "jessie", when you fix it, do
sudo apt-get update
sudo apt-get -f install
If your sources.list was correct, your should learn not to install debs from random sites.
Now to fix your libc6, reinstall it
wget https://archive.raspbian.org/raspbian/pool/main/e/eglibc/libc6-dev_2.13-38%2brpi2%2bdeb7u3_armhf.deb
sudo dpkg -i --force-all libc6-dev_2.13-38+rpi2+deb7u3_armhf.deb
sudo apt-get -f install
If it's to difficult for you to fix sources.list or that didn't help, please provide the output of the following commands
apt-cache policy libc6
apt-cache policy libc6-dev
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
This worked fine for me, from the 2015 image
wget https://archive.raspbian.org/raspbian/pool/main/e/eglibc/libc6-dev_2.13-38%2brpi2%2bdeb7u3_armhf.deb
sudo dpkg -i --force-all libc6-dev_2.13-38+rpi2+deb7u3_armhf.deb
sudo apt-get -f install

Cannot install nasm on my Ubuntu

I've tried to install nasm using: sudo apt-get install nasm, but I got the following output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I don't know what goes wrong here as I new with Ubuntu/Linux OS
Your package manager has noticed that some of your packages, even though they're installed, have prerequisites that aren't. This seems to be the reason nasm is not working.
This happens sometimes. Luckily, you can instruct apt-get to automatically fetch and install the missing dependencies:
sudo apt-get -f install
The sudo prefix will run the command as the root user, giving it the elevated permissions it needs to install software. You can think of sudo as "Super User DO", or "Switch User and DO".

Resources