Not able to install vim - linux

Iam trying to install vim and i get the following error
$ sudo apt-get install vim
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:
libpng12-0 : Breaks: libpng12-0:i386 (!= 1.2.50-2+deb8u3) but 1.2.54-1ubuntu1 is to be installed
libpng12-0:i386 : Breaks: libpng12-0 (!= 1.2.54-1ubuntu1) but 1.2.50-2+deb8u3 is to be installed
vim : Depends: vim-common (= 2:7.4.1689-3ubuntu1.2) but 2:7.4.1689-3ubuntu1 is to be installed
Depends: vim-runtime (= 2:7.4.1689-3ubuntu1.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Then I tried to run apt-get -f install with no packages.Then i got this error
The following additional packages will be installed:
libpng12-0
The following packages will be upgraded:
libpng12-0
1 upgraded, 0 newly installed, 0 to remove and 594 not upgraded.
3 not fully installed or removed.
Need to get 116 kB of archives.
After this operation, 11.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpng12-0 amd64 1.2.54-1ubuntu1 [116 kB]
Fetched 116 kB in 1s (69.8 kB/s)
(Reading database ... 240235 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) over (1.2.50-2+deb8u3) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libpng12-0/ANNOUNCE', which is different from other instances of package libpng12-0:amd64
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
/var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
If anyone could suggest the reason of this error that would be very helpful

Related

"mongodb-org : Depends: mongodb-org-server but it is not going to be installed" when installing mongodb in Ubuntu 20.04

I've committed the error of installing mongodb first by sudo apt install mongodb, removing it and then trying to install as the official documentation says so for Ubuntu 20.04 (Linux Mint), but now I can't install any other package because it gives me:
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 : Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Tried sudo apt reinstall sudo apt --fix-broken install sudo apt purge <package_name> sudo apt remove <package_name> sudo apt-get install -f
When running sudo apt install --fix-broken:
sudo apt install --fix-broken
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
mongodb-database-tools mongodb-org-mongos mongodb-org-server
The following NEW packages will be installed:
mongodb-database-tools mongodb-org-mongos mongodb-org-server
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/89,2 MB of archives.
After this operation, 148 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 414079 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.4.6_amd64.deb ...
Unpacking mongodb-org-server (4.4.6) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.4.6_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6
d-0ubuntu5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.4.6_amd64.deb ...
Unpacking mongodb-org-mongos (4.4.6) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.4.6_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6
d-0ubuntu5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-database-tools_100.3.1_amd64.deb ...
Unpacking mongodb-database-tools (100.3.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-server_4.4.6_amd64.deb
/var/cache/apt/archives/mongodb-org-mongos_4.4.6_amd64.deb
/var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
If I try to reinstall mongodb following the official doc it gives me again the same error I've mentioned before.
Thanks in advance.
This solved my problem;
dpkg -l | grep mongo will show the list of packages, then dpkg -r <nameofpkg> could be used for each packages for the output of dpkg -l | grep mongo.
Solved it.
sudo apt-get clean
sudo pkexec synaptic >> filter by "broken" >> remove completely the package
sudo apt-get install -f
Tanks for the help.

Unable to install python3-tk on Ubuntu 18.04.2 LTS

I am running Ubuntu 18.04.2 LTS:
user#vmubu01:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
And I am unable to install python3-tk using 'apt-get install' command as you can see below:
user#vmubu01:~$ sudo apt-get install python3-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
tix python3-tk-dbg
The following NEW packages will be installed:
python3-tk
0 upgraded, 1 newly installed, 0 to remove and 91 not upgraded.
3 not fully installed or removed.
Need to get 0 B/101 kB of archives.
After this operation, 891 kB of additional disk space will be used.
(Reading database ... 206924 files and directories currently installed.)
Preparing to unpack .../python3-tk_3.6.8-1~18.04_amd64.deb ...
Unpacking python3-tk:amd64 (3.6.8-1~18.04) ...
dpkg: error processing archive /var/cache/apt/archives/python3-tk_3.6.8-1~18.04_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.6/tkinter/__init__.py', which is also in package libpython3.6-stdlib:amd64 3.6.8-1+xenial1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/python3-tk_3.6.8-1~18.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am also unable to install it using pip, see the error below:
user#vmubu01:~$ pip3.6 install python3-tk
Collecting python3-tk
ERROR: Could not find a version that satisfies the requirement python3-tk (from versions: none)
ERROR: No matching distribution found for python3-tk
If I try to run the 'apt --fix-broken install' command I get:
user#vmubu01:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
python3-tk
Suggested packages:
tix python3-tk-dbg
The following NEW packages will be installed:
python3-tk
0 upgraded, 1 newly installed, 0 to remove and 91 not upgraded.
3 not fully installed or removed.
Need to get 0 B/101 kB of archives.
After this operation, 891 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 206924 files and directories currently installed.)
Preparing to unpack .../python3-tk_3.6.8-1~18.04_amd64.deb ...
Unpacking python3-tk:amd64 (3.6.8-1~18.04) ...
dpkg: error processing archive /var/cache/apt/archives/python3-tk_3.6.8-1~18.04_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.6/tkinter/__init__.py', which is also in package libpython3.6-stdlib:amd64 3.6.8-1+xenial1
Errors were encountered while processing:
/var/cache/apt/archives/python3-tk_3.6.8-1~18.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I please advise
Not sure this solution fits for every situation, but here is one that worked for me.
I had the same issue (except it was with Ubuntu 16.04), also tried what #Column01 wrote in comments:
sudo apt-get install python3.6-tk
Same problem.
But that gave me an idea. Checked:
$ python --version
Python 3.5.2
So the solution was as simple as:
sudo apt-get install python3.5-tk

Error while installing python3 and pip3 in kali linux

I have use the following commands at the time of installation:
tar -xvf python-3.3.0.tgz
cd python-3.3.0
./configure
make
sudo make altinstall
sudo apt-get install python3-pip
Error:
root#kali:~/Desktop/Python-3.3.0# sudo apt-get install python3-pip
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:
libc-bin : Depends: libc6 (< 2.20) but 2.21-0ubuntu4 is to be installed
libc6-dbg : Depends: libc6 (= 2.19-18) but 2.21-0ubuntu4 is to be installed
python3-pip : Depends: python3-colorama but it is not going to be installed
Depends: python3-distlib but it is not going to be installed
Depends: python3-html5lib but it is not going to be installed
Depends: python3-requests but it is not going to be installed
Depends: python3-setuptools but it is not going to be installed
Recommends: python3-dev (>= 3.2) but it is not going to be installed
Recommends: python3-wheel but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I have tried 'apt-get -f install' this command.
It gives following error:
root#kali:~/Desktop/Python-3.3.0# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc-bin libc6-dbg
The following packages will be upgraded:
libc-bin libc6-dbg
2 upgraded, 0 newly installed, 0 to remove and 1464 not upgraded.
3 not fully installed or removed.
Need to get 0 B/4,322 kB of archives.
After this operation, 2,792 kB disk space will be freed.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
libc-bin libc6-dbg
Install these packages without verification? [y/N] y
Reading changelogs... Done
(Reading database ... 323301 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.21-0ubuntu4_amd64.deb ...
Unpacking libc-bin (2.21-0ubuntu4) over (2.19-18) ...
dpkg: error processing archive /var/cache/apt/archives/libc-bin_2.21-0ubuntu4_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/update-locale', which is also in package locales 2.19-18
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/libc-bin_2.21-0ubuntu4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
How to resolve this error?
And how to install requests package for python3
tar -xvf python-3.3.0.tgz
cd python-3.3.0
./configure
make
sudo make altinstall
Next:
Download get-pip.py form below URL.
https://bootstrap.pypa.io/get-pip.py
install this as a 'py' file. Go to Linux terminal type in
root# python get-pip.py
Assuming downloaded file is located in 'root'
Now it would work fine

sudo apt-get install libao-common

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libao-common
0 upgraded, 1 newly installed, 0 to remove and 52 not upgraded.
4 not fully installed or removed.
Need to get 0 B/11.3 kB of archives.
After this operation, 49.2 kB of additional disk space will be used.
dpkg: regarding .../libao-common_1.1.0-2_armhf.deb containing libao-common:
libao-common conflicts with libao2
libao2 (version 0.8.4-1) is present and unpacked but not configured.
dpkg: error processing /var/cache/apt/archives/libao-common_1.1.0-2_armhf.deb (--unpack):
conflicting packages - not installing libao-common
Errors were encountered while processing:
/var/cache/apt/archives/libao-common_1.1.0-2_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Why is conflicting packages not installing libao-common?
It’s on a Raspberry PI with Raspbian.
apt-get -f install doesn't work
root#raspberrypi:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libao-common
The following NEW packages will be installed:
libao-common
0 upgraded, 1 newly installed, 0 to remove and 52 not upgraded.
4 not fully installed or removed.
Need to get 11.3 kB of archives.
After this operation, 49.2 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libao-common armhf 1.1.0-2 [11.3 kB]
Fetched 11.3 kB in 2s (4,117 B/s)
dpkg: regarding .../libao-common_1.1.0-2_armhf.deb containing libao-common:
libao-common conflicts with libao2
libao2 (version 0.8.4-1) is present and unpacked but not configured.
dpkg: error processing /var/cache/apt/archives/libao-common_1.1.0-2_armhf.deb (--unpack):
conflicting packages - not installing libao-common
Errors were encountered while processing:
/var/cache/apt/archives/libao-common_1.1.0-2_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
notice that message:
4 not fully installed or removed.
maybe you install other package failed. then the apt tool try to install them again.
so, uninstall these error package first.
sudo apt-get --force-yes remove #your-package-name#
you need to remove the 4 not fully installed or removed package first.
then
sudo apt autoremove
now, try to install the new package again.

icinga-web unmet dependencies

I am trying to install icinga-web and I am getting following error:-
I tried installing both the icinga-core and icinga-idoutils but I still get this error.
apt-get install icinga-web
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:
icinga-web : Depends: icinga-core (>= 1.7.0) but 1.6.1-2 is to be installed
Depends: icinga-idoutils (>= 1.7.0) but 1.6.1-2 is to be installed
E: Unable to correct problems, you have held broken packages.
Just FYI,
apt-get install icinga-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
pkg-config libpthread-stubs0 libfontconfig1-dev x11proto-kb-dev xtrans-dev x11proto-input-dev libxpm-dev libfreetype6-dev libxau-dev xorg-sgml-doctools libx11-dev libx11-doc libxcb1-dev x11proto-core-dev libxdmcp-dev
libpthread-stubs0-dev
Use 'apt-get autoremove' to remove them.
Suggested packages:
nagios-nrpe-plugin
The following NEW packages will be installed:
icinga-core
0 upgraded, 1 newly installed, 0 to remove and 117 not upgraded.
Need to get 0 B/287 kB of archives.
After this operation, 804 kB of additional disk space will be used.
Selecting previously unselected package icinga-core.
(Reading database ... 38940 files and directories currently installed.)
Unpacking icinga-core (from .../icinga-core_1.6.1-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up icinga-core (1.6.1-2) ...
* There is no configuration file for Icinga.
invoke-rc.d: initscript icinga, action "start" failed.
apt-get install icinga-idoutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
pkg-config libpthread-stubs0 libfontconfig1-dev x11proto-kb-dev xtrans-dev x11proto-input-dev libxpm-dev libfreetype6-dev libxau-dev xorg-sgml-doctools libx11-dev libx11-doc libxcb1-dev x11proto-core-dev libxdmcp-dev
libpthread-stubs0-dev
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
icinga-idoutils
0 upgraded, 1 newly installed, 0 to remove and 117 not upgraded.
Need to get 0 B/221 kB of archives.
After this operation, 1,442 kB of additional disk space will be used.
Selecting previously unselected package icinga-idoutils.
(Reading database ... 38947 files and directories currently installed.)
Unpacking icinga-idoutils (from .../icinga-idoutils_1.6.1-2_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up icinga-idoutils (1.6.1-2) ...
dbconfig-common: writing config to /etc/dbconfig-common/icinga-idoutils.conf
Creating config file /etc/dbconfig-common/icinga-idoutils.conf with new version
Creating config file /etc/icinga/ido2db.cfg with new version
granting access to database icinga for icinga-idoutils#localhost: success.
verifying access for icinga-idoutils#localhost: success.
creating database icinga: success.
verifying database icinga exists: success.
populating database via sql... done.
dbconfig-common: flushing administrative password
This problem is resolved.
I have deleted corrupted packages from (/var/lib/dpkg/status)
Package system broken - E: Sub-process /usr/bin/dpkg returned an error code (1)
And re-install all icinga packages again using icinga PPA.
Thanks for your help.

Resources