dependency problems - leaving unconfigured [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
The community reviewed whether to reopen this question 12 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
This is what I get when I tried to install git in Ubuntu 18.04. I may have asked a repeated question but I am not getting any solution.
kcn#kcn-UBUNTU:~$ sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.17.1-1ubuntu0.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/7,732 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package libavahi-glib1:amd64 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of geoclue-2.0:
geoclue-2.0 depends on libavahi-glib1 (>= 0.6.16); however:
Package libavahi-glib1:amd64 is not configured yet.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package geoclue-2.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgeoclue-2-0:amd64:
libgeoclue-2-0:amd64 depends on geoclue-2.0 (= 2.4.7-1ubuntu1); however:
Package geoclue-2.0 is not configured yet.
dpkg: error processing package libgeoclue-2-0:amd64 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
libavahi-glib1:amd64
geoclue-2.0
libgeoclue-2-0:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to do the following:
kcn#kcn-UBUNTU:~$ sudo apt-get install git
[sudo] password for kcn:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure
-a' to correct the problem.
So I typed
kcn#kcn-UBUNTU:~$ sudo dpkg --configure -a
................
................
dpkg: error processing package libavahi-glib1:amd64 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration

Try this out:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt install libavahi-glib1 --reinstall
sudo dpkg --configure -a
Instruct dpkg to "fix" itself
sudo apt-get -f install
This will instruct apt-get to correct dependencies and continue to configure your packages.
sudo apt install libavahi-glib1 --reinstall
reinstall the "probelatic package"

First try reinstalling broken package like prompt says with e.g.
sudo apt-get install --reinstall libavahi-glib1

Related

Ubuntu 16.04 latest update broke Docker (docker-ce) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I run Ubuntu 16.04 on my desktop. I use docker-ce and it has been working up until a few days ago. The auto-update in Ubuntu seems to have broken it.
robert#catness:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I tried following the instructions at https://docs.docker.com/install/linux/docker-ce/ubuntu/ to remove and reinstall but it hasn't worked.
robert#catness:~$ sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker-ce is already the newest version (5:18.09.0~3-0~ubuntu-xenial).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
docker-ce : Depends: containerd.io but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I believe the issue is with containerd.io. The command sudo apt-get -f install tries to install it and this errors:
The following additional packages will be installed:
containerd.io
The following NEW packages will be installed
containerd.io
0 to upgrade, 1 to newly install, 0 to remove and 1 not to upgrade.
1 not fully installed or removed.
Need to get 0 B/19.9 MB of archives.
After this operation, 87.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 523620 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.2.0-1_amd64.deb ...
Unpacking containerd.io (1.2.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/containerd.io_1.2.0-1_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/runc', which is also in package runc 1.0.0~rc2+docker1.13.1-0ubuntu1~16.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/containerd.io_1.2.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
There was some problem with /usr/sbin/runc, as part of debugging I tried deleting the file there, but this has made no difference at all:
robert#catness:~$ ls /usr/sbin/runc
ls: cannot access '/usr/sbin/runc': No such file or directory
robert#catness:~$ sudo ls /usr/sbin/runc
ls: cannot access '/usr/sbin/runc': No such file or directory
Does anyone have any suggestions as to what I should do next to investigate this issue.
I'd remove the runc package. The docker1.13.1 version is a pointer to a very old and unsupported version of docker, so this is likely left over from a past upgrade. Then you should be able to install containerd.io.
You may have to remove the docker-ce package first using apt-get remove docker-ce and then execute your apt-get remove runc then to install docker-ce again you have to use apt-get install docker-ce. This is because trying to remove runc without first removing docker-ce does not work
Let me know if that's successful as I'd like to open an issue in docker for this if one doesn't already exist.

Having trouble installing mongodb on ubuntu version 18.04 LTS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I've recently installed Ubuntu version 18.04 LTS and just started to learn to use use linux and terminal. I want to install mongodb. I'm following the steps from this website.
i ran the following lines in the terminal
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
after i run the fourth line the following appears
tasif#Tasif-Dell:/$ sudo apt-get install -y mongodb-org
[sudo] password for tasif:
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-server but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.
Then when i want to start mongodb the following message is displayed
tasif#Tasif-Dell:/$ sudo service mongod start
[sudo] password for tasif:
Failed to start mongod.service: Unit mongod.service not found.
installing libcurl3 fixed it for me
sudo apt install libcurl3
Unfortunately, there's no non-development release of MongoDB for 18.04 yet. (Current as of 2018-07-12)
https://repo.mongodb.org/apt/ubuntu/dists/bionic/ shows that there's only a dev release.
Your specific problem is that you are not installing all the dependencies for Mongo, which can probably be fixed with:
sudo apt-get install -f
Per this ask Ubuntu answer.

Installing postgresql on ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I get the below error when I'm trying to install Postgres Data Base by running that command on Ubuntu OS sudo apt-get install postgresql-9.4
dpkg: error processing package postgresql-9.4 (--configure):
subprocess installed post-installation script returned error exit
status 2 dpkg: dependency problems prevent configuration of
postgresql-contrib-9.4: postgresql-contrib-9.4 depends on
postgresql-9.4 (= 9.4.11-1.pgdg16.04+1); however: Package
postgresql-9.4 is not configured yet. dpkg: error processing package
postgresql-contrib-9.4 (--configure): dependency problems - leaving
unconfigured No apport report written because the error message
indicates its a followup error from a previous failure. Errors were
encountered while processing: postgresql-9.4 postgresql-contrib-9.4 E:
Sub-process /usr/bin/dpkg returned an error code (1)
If you tried several solutions, you probably have some leftovers from that tries.
To start from 'scratch' you have to uninstall everything and cleanup your system before trying anything:
sudo apt-get purge 'postgresql.*'
This will uninstall all packages and remove all config files.
Note: this will also remove all database files from your system.
After that you have to check what repositories you have added to the system.
Check /etc/apt/sources.list file and every other files in /etc/apt/sources.list.d/ directory.
Remove everything related to postgresql and 'pgdg'.
And finally, you can follow official postgresql manual here:
https://wiki.postgresql.org/wiki/Apt

Ubuntu 12.04 update to the 3.8 kernel fails [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I've been trying to update the kernel on our Linux server running Ubuntu 12.04.5 LTS.
Running uname -r displays 2.6.32-042stab113.11 as the current version.
I've run the usual apt-get update to get the latest packages.
I've run the following command:
apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
This outputs the information below with the final lines outputting:
Errors were encountered while processing:
linux-image-3.8.0-44-generic
linux-image-generic-lts-raring
E: Sub-process /usr/bin/dpkg returned an error code (1)
Further up the output is another error:
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.8.0-44-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.8.0-44-generic.postinst line 1010.
dpkg: error processing linux-image-3.8.0-44-generic (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of linux-image-generic-lts-raring:
linux-image-generic-lts-raring depends on linux-image-3.8.0-44-generic; however:
Package linux-image-3.8.0-44-generic is not configured yet.
I've tried running apt-get autoclean, apt-get -f install to fix broken packages.
I am wondering if I could do apt-get remove linux-image-3.8.0-44-generic
linux-image-generic-lts-raring and then install again.
Should I run apt-get upgrade.
I've been reluctant to do this so far in case it breaks the server and puts our sites offline.
Any advice?
Full Output from terminal:
root#213-xx-xxx-xx:/var/www/vhosts/example.com# apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-generic-lts-raring is already the newest version.
linux-image-generic-lts-raring is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up linux-image-3.8.0-44-generic (3.8.0-44.66~precise1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.8.0-44-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-44-generic
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.8.0-44-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.8.0-44-generic.postinst line 1010.
dpkg: error processing linux-image-3.8.0-44-generic (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of linux-image-generic-lts-raring:
linux-image-generic-lts-raring depends on linux-image-3.8.0-44-generic; however:
Package linux-image-3.8.0-44-generic is not configured yet.
dpkg: error processing linux-image-generic-lts-raring (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-3.8.0-44-generic
linux-image-generic-lts-raring
E: Sub-process /usr/bin/dpkg returned an error code (1)
Try the following:
apt-get autoclean
apt-get clean
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -f install
dpkg --configure -a
This should be fixing the problem.
Try
sudo chmod -x /usr/share/initramfs-tools/hooks/fixrtc
as suggested here.
This disables the fixrtc hook, which is not in all cases needed.
You can undo this step with
sudo chmod +x /usr/share/initramfs-tools/hooks/fixrtc

How to remove an incomplete package by using apt-get? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've tried to install android-studio via apt-get in Ubuntu and find that a dependency package with a size of 233 M is required to download from Google. Since I'm in China the network condition is so bad that I cannot download the package completely, and finally I have to give up.
However here comes a problem: now every time I execute apt-get I will get a hint of Incomplete dependency and be asked to download the package above. If I execute sudo apt-get remove android-studio an error will occur:
dpkg: error processing package android-studio (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
An error occurred when processing:
android-studio
E: Sub-process /usr/bin/dpkg returned an error code (1)
My apt-get was stuck. So how can I remove an incomplete package entirely?
Try running following commands on the terminal:
sudo apt-get autoremove
sudo apt-get --purge remove
sudo dpkg --remove --force-remove-reinstreq tspc
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get -f install
These may clear or fix broken packages and try to install again.
Open synaptic Install synaptic. Then go to status and choose Broken. Then remove completely the broken packages.

Resources