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
Related
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
sudo apt-get install nodejs
[sudo] password for akhil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.1).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic linux-headers-4.4.0-57 linux-headers-4.4.0-57-generic
linux-image-4.4.0-51-generic linux-image-4.4.0-57-generic linux-image-extra-4.4.0-51-generic linux-image-extra-4.4.0-57-generic
ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 140 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
Setting up python-gunicorn (19.4.5-1ubuntu1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/gunicorn
dpkg: error processing package python-gunicorn (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of gunicorn:
gunicorn depends on python-gunicorn (= 19.4.5-1ubuntu1); however:
Package python-gunicorn is not configured yet.
dpkg: error processing package gunicorn (--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:
python-gunicorn
gunicorn
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am trying to install nodejs on my system.But the above error occured.
I already installed gunicorn in my system.Please figureout what is the real issue?
When i'm trying to install libapache2-mod-fastcgi for apache as following:
OS: Ubuntu 14.04
root#server:~# sudo apt-get install libapache2-mod-fastcgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-fastcgi is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 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
Setting up libapache2-mod-fastcgi (2.4.7~0910052141-1.1) ...
dpkg: error processing package libapache2-mod-fastcgi (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-fastcgi
E: Sub-process /usr/bin/dpkg returned an error code (1)
What's wrong ? I've done this before on Ubuntu, But this time an error came up.
Both sudo dpkg --configure -a and sudo apt-get install -f
Setting up libapache2-mod-fastcgi (2.4.7~0910052141-1.1) ...
dpkg: error processing package libapache2-mod-fastcgi (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-fastcgi
There was a better solution (yours doesn't works for me):
Uninstall the module
sudo apt-get remove --auto-remove libapache2-mod-fastcgi
Purge config/data
sudo apt-get purge --auto-remove libapache2-mod-fastcgi
Then you can install the module
sudo apt-get install libapache2-mod-fastcgi
I am using sudo apt-get install mongodb command but it is giving me error , i think there is problem with packaging but i am unable to find it.
mongodb start/running, process 15259
Can't exec "/sbin/insserv": No such file or directory at /usr/sbin/update-rc.d line 382.
update-rc.d: error: insserv rejected the script header
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package mongodb-server (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of mongodb:
mongodb depends on mongodb-server (>= 1:2.4.1-2); however:
Package mongodb-server is not configured yet.
dpkg: error processing package mongodb (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
postfix
mongodb-server
mongodb
E: Sub-process /usr/bin/dpkg returned an error code (1)
With version 3.0 MongoDB has split the package into parts. E.g. you may install just mongo shell. Take a look at this article.
This was some time back. I have mongo working OK
Un install anything you have NOW ... There is a default Mongo comes with Ubuntu.
Visit the Ubuntu Mongo-shell installation.
Install Mongo on Ubuntu
The other Install-s appear to depend on the shell install. I find that refreshing actually. I wish real databases(tm) would pay attention. Things USED-TO work like that. All the time. Wow.
The other useful tidbits are ...
stop
restart
start
And
configuration.
file: /etc/mongod.conf
see also: /etc/init.d/README file.
A very useful engine ... w
You can try this
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
more details
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/
I'm trying to install things in Linux (Crunchbang Linux - a derivation of Debian), and I'm getting errors which point towards mongodb-20gen.
When I try to remove it using :-
cometbill#Linuxn00b:~$ sudo apt-get remove mongodb-10gen
I get ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mongodb-10gen
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 221 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 81657 files and directories currently installed.)
Removing mongodb-10gen ...
arg: remove
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--remove):
subprocess installed pre-removal script returned error exit status 100
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
I read something on here for similar errors with MongoDB, and it suggested removing mongo-clients, so, I tried:-
cometbill#Linuxn00b:~$ sudo apt-get remove mongodb-clients
and get:-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mongodb-clients' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-10gen (2.4.6) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is a difficult state to get out of. You should be able to complete the removal if you create a fake init script:
sudo touch /etc/init.d/mongodb
sudo chmod 755 /etc/init.d/mongodb
This is due to some corruption within the package manager dpkg itself, this thread from Ask Ubuntu: https://askubuntu.com/questions/195950/package-system-broken-e-sub-process-usr-bin-dpkg-returned-an-error-code-1 lists some solutions, more specifically the editing of the status file has been noted as one that always works.
For mongodb v3.4
sudo touch /etc/init.d/mongod
sudo chmod 755 /etc/init.d/mongod
You can force installation of package:
sudo dpkg -i --force-all /var/cache/apt/archives/mongodb-org-tools_3.6.5_amd64.deb
Then resume with:
sudo apt-get install -f
sudo nano /var/lib/dpkg/statoverride
Then remove first 2 line entries and try again
**mongodb mongodb 755 /var/log/mongodb
mongodb mongodb 755 /var/lib/mongodb**
root crontab 2755 /usr/bin/crontab
root mlocate 2755 /usr/bin/mlocate
root ssl-cert 710 /etc/ssl/private
root messagebus 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
According to your question, this process will be break at line.
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
You must be create fake file,
sudo touch /etc/init.d/mongodb
sudo chmod 755 /etc/init.d/mongodb
and process will complete.