So I have docker installed on Linux Mint 18.3 (dual-boot with Windows 7) and I can run and work with the containers without an issue. However, ever since I installed it, I keep getting errors while I try to upgrade my packages.
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 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 docker.io (1.13.1-0ubuntu1~16.04.2) ...
addgroup: The group `docker' already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to install docker.io again and see what happens:
$ sudo apt-get install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker.io is already the newest version (1.13.1-0ubuntu1~16.04.2).
0 upgraded, 0 newly installed, 0 to remove and 0 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 docker.io (1.13.1-0ubuntu1~16.04.2) ...
addgroup: The group `docker' already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
Running $ groups returns this:
$ groups
kosara adm dialout cdrom sudo dip plugdev lpadmin sambashare docker
I did some digging and ran $ sudo dpkg --configure -a:
$ sudo dpkg --configure -a
Setting up docker.io (1.13.1-0ubuntu1~16.04.2) ...
addgroup: The group `docker' already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
But it seems that a package that isn't fully installed is to blame, so I tried to fix it:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up docker.io (1.13.1-0ubuntu1~16.04.2) ...
addgroup: The group `docker' already exists and is not a system group. Exiting.
dpkg: error processing package docker.io (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
I removed docker and did a clean install, to no avail. I'm not really sure what to try next and I couldn't find a solution that works for me so far. Any help would be welcome!
Related
"sudo apt-get install phppgadmin"
Reading package lists... Done
Building dependency tree
Reading state information... Done
phppgadmin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 65 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 phppgadmin (5.1-1) ...
* Reloading web server apache2 *
* Apache2 is not running
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing package phppgadmin (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
phppgadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
What has to be done to remove this error and successfully install the phppgadmin
Try starting the apache process and then re-run the installation.
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'm trying to reinstall it, because it has problems. For example, I can't install Chromium because mongodb-org-server is not configured. But I can't even remove it for the same reason.
apt-get autoremove --purge mongodb
Or:
apt-get purge mongodb
Or:
apt-get remove --purge mongodb
All end in the same way:
dpkg: error processing package mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 102
Errors were encountered while processing:
mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Some data about my machine from hostnamectl:
Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.14-2-amd64
Architecture: x86_64
How can I fix this?
Updates: things I tried/I'm trying
apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 973 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-org-server (3.0.2) ...
dpkg: error processing package mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 102
Errors were encountered while processing:
mongodb-org-server
To avoid that sort of problems you should install software only from native Debian repositories. Unfortunately it is not unusual when sloppy/incompetent 3rd party packages are responsible for such troubles.
To recover try removing file /var/lib/dpkg/info/mongodb-org-server.postinst before attempting to apt-get purge mongodb.
Remove all mongodb file inside
/var/lib/dpkg/info/mongodb
And then do
sudo apt purge mongodb-org*
Answer credits to: Lazyexpert
I want to install mongoDB on Debian. The problem is when I try to do that the output is like this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mongodb-10gen is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 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 mongodb-10gen (2.4.10) ...
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)
I've searched about that and found some solutions like:
install mongodb-10gen failed with apt-get
But when try to run this command:
apt-get remove mongodb-clients
The result is:
[root#Takhalof-srv ~]$ apt-get remove mongodb-clients
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 4 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.10) ...
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)
When I try to run this command:
sudo service mongodb restart
The result is:
mongodb: unrecognized service
When I use apt-get -f install the result is:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 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.10) ...
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)
I really confused and don't know what's the problem. What should I do?
The error in your first command strongly suggest that the MongoDB server(/daemon) isn't installed. Try installing mongodb-server, then doing apt-get -f install to finish configuring any half installed packages.
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.