how to resolve unmet dependencies in ubuntu(16.04)? - ubuntu-16.04

i install libstdc++.so.6.0.9 then after this my ubuntu give this error
latitude$sudo apt-get upgrade
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:
libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.9) but 5.4.0-6ubuntu1~16.04.5 is installed
E: Unmet dependencies. Try using -f.
And when I run
asad#asad-Latitude-E7440:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.9) but 5.4.0-6ubuntu1~16.04.5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

will sort your message for analyzing, met the same situation
$ sudo apt-get -f install
Reading package lists... Done Building dependency tree
Reading state information... Done Correcting dependencies... failed.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.9) but 5.4.0-6ubuntu1~16.04.5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
at first, you can run the command
sudo dpkg --force-depends --remove libstdc++6
and then download the latest libstdc++6 and install it
BTW, you can search the latest libstdc++6 from the below link? https://launchpad.net/ubuntu/xenial/amd64?text=libstdc%2B%2B6
wget http://launchpadlibrarian.net/385645739/libstdc++6_5.4.0-6ubuntu1~16.04.11_amd64.deb
sudo dpkg --force-depends -i libstdc++6_5.4.0-6ubuntu1~16.04.11_amd64.deb
finally, you can run
sudo apt-get -f install

Thanks any one .My problem has solved.I m giving here for anyone who will have this problem. Solution is
sudo aptitude purge libstdc++6

Recently, I was trying to install an application on Ubuntu 18.04 where I faced this issue. I went through a lot of troubleshoots and finally, one of the methods helped me.
Once I got the dependency error, I used the command $sudo apt-get install aptitude. Then I installed the application through aptitude command. The syntax is
$sudo aptitude install app_name.
To my surprise, my required app got installed.
My doubt is that, will this method work for all the unmet dependencies error and for all applications?

Related

Unable to install mongodb in ubuntu 22.04 (mongodb-org, libssl1.1)

On following installation instructions from MongoDB official site.
While installing mongodb-org package getting the following error
sudo apt install -y mongodb-org
Reading package lists... Done
Building dependency tree... Done
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:
mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable
mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable
mongodb-org-shell : Depends: libssl1.1 (>= 1.1.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
I tried installing libssl1.1 package using apt but I was unable to do so it throws following error.
E: Package 'libssl1.1' has no installation candidate
please someone help.
It seems mongodb require specific version of libssl1.1
you can download debian file of that version and install using following commands. Most probably it will resolve this issue.
sudo wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
After hours of looking for a solution I was satisfied with, I finally stumbled across one! Hope this helps anyone else looking to install MongoDB community edition without sacrificing security by using libssl1.1 (the solution here uses >3.0.
MongoDB has the repository for Ubuntu 22.04.1 LTS (Jammy Jellyfish) hidden away. It definitely still isn't on the documentation installation pages as of the time I am posting this. Check it out yourself: https://repo.mongodb.org/apt/ubuntu/dists/jammy/mongodb-org/
The following code will add the repository and install the latest mongodb-org on your system:
sudo apt-get install wget gpg
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor > packages.mongodb.gpg
sudo install -D -o root -g root -m 644 packages.mongodb.gpg /etc/apt/keyrings/packages.mongodb.gpg
echo "deb [ arch=amd64,arm64 signed-by=/etc/apt/keyrings/packages.mongodb.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
rm -f packages.mongodb.gpg
sudo apt-get install -y mongodb-org

unfinished installation of pgadmin4 keeps blocking other installations

I have been trying to install pgAdmin4 but I get this error below, I tried to resolve the error and I couldn't, so I decided to go on with my installations, then I tried Mongodb, it also can't install
sudo apt-get install -y mongodb-org=4.4.2 mongodb-org-server=4.4.2 mongodb-org-shell=4.4.2 mongodb-org-mongos=4.4.2 mongodb-org-tools=4.4.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
Depends: mongodb-org-database-tools-extra but it is not going to be installed
pgadmin4 : Depends: pgadmin4-web but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I have tried:
sudo apt --fix-broken install
but still no positive yields as the error persists
How can I fully remove pgAdmin, I mean anything related to postgres, so that I re install a new fresh bundle.
The problem was with my dpkg config. but this helped me out
https://itectec.com/ubuntu/ubuntu-how-to-remove-install-a-package-that-is-not-fully-installed/

Unable to install Conduktor - Depends: libglx0 but it is not installable

While installation I am having package conflicts. This is the response I am receiving.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'conduktor' instead of './Conduktor-2.2.5.deb'
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:
conduktor : Depends: libglx0 but it is not installable
E: Unable to correct problems, you have held broken packages.
For anyone who is having problens with Conduktor on Ubuntu 20:
Ubuntu 20 updated from libffi6 (required by Conduktor) to libffi7, so you'll end up with this error:
$ sudo apt install ./Conduktor-2.7.5.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'conduktor' instead of './Conduktor-2.7.5.deb'
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:
conduktor : Depends: libffi6 but it is not installable
E: Unable to correct problems, you have held broken packages.
You can fix it this way:
download libffi6 here http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
instal it: $ sudo apt install ./libffi6_3.2.1-8_amd64.deb
now, with success, install Conduktor: $ sudo apt install ./Conduktor-2.7.5.deb
It seems Conduktor does not support Ubuntu 16.04, the libglx0 library is only available starting from bionic (18.04 LTS): https://packages.ubuntu.com/search?lang=en&keywords=libglx0&searchon=names
This command helped me:
sudo apt --fix-broken install

How to resolve this error while installing VSCode in Kali Linux?

I get this error code while installing.
I have tried using
sudo apt intall ./<filename>.deb
but it gives this error
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
code : Depends: libgconf-2-4 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And also this:
sudo dpkg -i code_1.30.2-1546901646_amd64.deb
But it gives another error.
Selecting previously unselected package code.
(Reading database ... 340375 files and directories currently installed.)
Preparing to unpack code_1.30.2-1546901646_amd64.deb ...
Unpacking code (1.30.2-1546901646) ...
dpkg: dependency problems prevent configuration of code:
code depends on libgconf-2-4; however:
Package libgconf-2-4 is not installed.
dpkg: error processing package code (--install):
dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.61) ...
Errors were encountered while processing:
code
Even sudo apt --fix-broken install doesn't help.
You need to install libgconf as the error states. You can find a deb for it here or use apt:
sudo apt install gconf

Cannot install latest Mongdb

My production Mongo database was hacked and all databases deleted. I now want to upgrade to the latest version of Mongo but am having extraordinary problems. Im on Linux Mint 17.1. Im following instructions here:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
When I run:
sudo apt-get install -y mongodb-org
I end up with error:
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:
mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
Depends: mongodb-org-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
What can I try next? As I said, my app is down since the hack and now I cannot even install Mongo...
Try sudo apt-get install -f to fix packages.
If that doesn't work, figure out if you need all 4 packages, mongodb-org-server might be the only one you really need.
In this case you can try running the following command with a specific version (3.0.15 in my case):
sudo apt-get install -y --force-yes mongodb-org=3.0.15 mongodb-org-server=3.0.15 mongodb-org-shell=3.0.15 mongodb-org-mongos=3.0.15 mongodb-org-tools=3.0.15