Ubuntu Software cannot install program - mongodb

i can't download any program using Ubuntu Software.
Example error defination is that(for install Kdenlive) :
Unable to install Kdenlive:
Error while installing package: mongo-tools 3.6.3-0ubuntu1 ..... '/usr/bin/bsondump'

Try this:
sudo apt-get update
sudo apt-get install mongodb-org-tools
sudo apt-get install kdenlive
and post the errors you are getting, if any.

Related

The following packages have unmet dependencies: mongodb-org :

I am trying to install Mongodb using the command sudo apt-get install -y mongodb-org on ubuntu 16.04 after it produces the following error:
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
E: Unable to correct problems, you have held broken packages.
Looking at the MongoDB Documentation at https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ it says to use their package not the Ubuntu APT package.
Here are the steps to use the MongoDB Package in a nutshell...
Add the APT Key:
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
Add the APT Sources List:
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
Update APT:
sudo apt-get update
Install the MongoDB Community Edition Package:
sudo apt-get install -y mongodb-org
Start the service:
sudo service mongod start
Log into the database using mongoshell:
mongo
If someone else struggle with this issue and all the other answers didn't work...
This is what work for me:
apt-get install mongodb-org-shell
apt-get install mongodb-org-server
apt-get install mongodb-org-mongos
And then again
sudo apt-get install -y mongodb-org
Detials (run uname -a):
Linux resta-dev 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I got this issue when the wrong Ubuntu version was selected. Make sure you double check that you run the correct one.
Your system already had the Ubuntu MongoDB package installed prior to installing the official mongodb-org packages. To confirm whether the host has the Ubuntu mongodb package installed, run;
sudo apt list --installed | grep mongo
If present you will need to remove all the installed mongodb-org packages by running;
sudo apt remove mongo*
Once all the MongoDB packages are removed you can now use the Official installation Guide to complete your installation
Use this command to display the installed applications and their dependencies causing troubles:
sudo dpkg --configure -a
and use the following command and replace package-name with the name of the package that need to be removed
sudo dpkg --remove package-name
You are now good to go.

Remove grafana from ubuntu 17.10

I'm trying to un-install grafana 4.6.3 from Ubuntu 17.10, but is not possible. So far i have tried
sudo apt-get remove grafana , sudo apt-get remove --auto-remove grafana
and says Unable to locate package grafana.
Also tried to install it again from ubuntu software in order to unistall it properly but then pops me up an error message says: Unable to install grafana snap "graphana" is already installed. I installed it first time from ubuntu software.
What can i do to un-install it?
Have you tried dpkg?
sudo dpkg --remove --force-remove-reinstreq <packagename>
If apt won't remove it try using dpkg.
You could also try and clean up your apt utility.
sudo rm -rf /var/cache/apt/archives/<package_name.deb>
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade

Getting Error while installing java8 on ubuntu 16.04

I tried to install java 8 on ubuntu 16.04.
The steps followed are :
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt install oracle-java8-installer
while running sudo apt install oracle-java8-installer I got the below error.
dpkg: error processing package unattended-upgrades (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Errors were encountered while processing:
openjdk-8-jre-headless:amd64
locales
oracle-java8-installer
linux-image-4.4.0-78-generic
linux-image-extra-4.4.0-78-generic
linux-image-generic
linux-generic
openjdk-8-jre:amd64
postgresql-common
postgresql-9.6
postgresql-contrib-9.6
postgresql-contrib
sysstat
tomcat8
unattended-upgrades
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please suggest me how to overcome by this error on Ubuntu and suggest the steps to install oracle-java8.
Open Terminal -> and do the following steps sequentially:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
and finally type:java -version.
This command will show you whether jdk installed in your Ubuntu or not.

how to install mongodb on ubuntu 16.04.1?

I have used the instructions from the docs
after this command:
sudo apt-get install -y mongodb-org
I get this warning:
WARNING: The following packages cannot be authenticated!
mongodb-org-shell mongodb-org-server mongodb-org-mongos mongodb-org-tools mongodb-org
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
Its instruction to start and test gives the following:
sudo service mongod start
cat /var/log/mongodb/mongod.log
cat: /var/log/mongodb/mongod.log: No such file or directory
As I mentioned in the comment, you could solve the problem by bypassing the gpg signature checks of apt using :
sudo apt-get --allow-unauthenticated install -y mongodb-org
You might want to have a look at more configuration options in detail along with right practices of using this appraoch here : https://askubuntu.com/questions/74345/how-do-i-bypass-ignore-the-gpg-signature-checks-of-apt
The mongodb docs have a great page on installing the latest mongo on Ubuntu. You can find it at: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
I'd recommend uninstalling mongodb and following the instructions on the previously mentioned page.

error in installing libpq-dev in ubuntu 14.04 after installing psycopg2

I am trying to install all requirements of a project so i run the command
pip install -r requirements.txt
but it gives the error
Downloading/unpacking psycopg2==2.6 (from -r requirements.txt (line 58))
Downloading psycopg2-2.6.tar.gz (367kB): 367kB downloaded
Running setup.py (path:/tmp/pip_build_root/psycopg2/setup.py) egg_info for package psycopg2
Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Error: b'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.\n'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/psycopg2
Storing debug log for failure in /home/admin/.pip/pip.log
now i knew that i have to install postgresql-server so i used following command
sudo apt-get install postgresql
all good till now and then i ran
sudo apt-get install python-psycopg2
and then i ran my command to install requirements again but got the same error and then i searched on google and tried
sudo apt-get install libpq-dev
but i got following 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:
libpq-dev : Depends: krb5-multidev but it is not going to be installed
Depends: comerr-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
now i am unable to detect and correct broken package...please help me...
I ran the following commands to repair broken package and then i successfully installed Psycopg2 and Postgresql ...
sudo apt-get update
sudo apt-get install python-dev
sudo apt-get install libpq-dev
sudo apt-get install krb5-multidev
sudo apt-get install libssl1.0.0=1.0.1f-1ubuntu2 ibcomerr2=1.42.9-3ubuntu1
sudo apt-get install libssl1.0.0=1.0.1f-1ubuntu2
sudo apt-get install ibcomerr2=1.42.9-3ubuntu1
sudo apt-get update
sudo apt-get install libpq-dev
apt-get install libssl-dev krb5-multidev comerr-dev
sudo apt-get install libssl-dev krb5-multidev comerr-dev
sudo apt-get dist-upgrade
sudo apt-get update
sudo apt-get install libssl-dev krb5-multidev comerr-dev
sudo apt-get install libcomerr2
sudo apt-get install comerr-dev
sudo apt-get install libcomerr2
sudo apt-get install comerr-dev
sudo apt-get install comerr-dev
sudo apt-get install 1.42.9-3ubuntu1.3
sudo apt-get install ibcomerr2=1.42.9-3ubuntu1
sudo apt-get install git
git clone https://github.com/kos0/addRemoveDistribution.git
cd addRemoveDistribution
sudo ./enableDisableDistribution.pl enable security
sudo ./enableDisableDistribution.pl enable updates
sudo apt-get update
sudo apt-get install libpq-dev
sudo apt-get update
pip install -r requirements.txt
Just follow only Steps
sudo apt-get install git
git clone https://github.com/kos0/addRemoveDistribution.git
cd addRemoveDistribution
sudo ./enableDisableDistribution.pl enable security
sudo ./enableDisableDistribution.pl enable updates
sudo apt-get update
sudo apt-get install libpq-dev
sudo apt-get update
I Fixed issue by those above steps