Having Problem after running sudo apt upgrade
**Unpacking nodejs (16.19.0-deb-1nodesource1) over (12.22.9~dfsg-1ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_16.19.0-deb-1nodes
ource1_amd64.deb (--unpack):
trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in pa
ckage libnode72:amd64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
/var/cache/apt/archives/nodejs_16.19.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
**
code should upgrade all the dependency
Related
I am trying to install this package software-properties-common on Ubuntu 20.04 and I'm facing the following problem:
cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any idea how I could solve it?
I am considering deleting the /run/systemd/resolve/stub-resolv.conf but I am not sure this is a good idea and if it would solve the problem.
I removed /run/systemd/resolve/stub-resolv.conf and ran sudo apt-get -f install again and it solved the issue.
I have a big problem with python idle. If I try to run for example
sudo apt-get install apache2 I get this error:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And it is not just for apache, it happens for all the apps that I try to install with sudo apt-get install
I've tried to unistall idle, but it doesen't work
If I run
sudo apt-fix broken install
I get this error:
dpkg: error processing archive /var/cache/apt/archives/idle-python3.6_3.6.8-1~18.04.york0_all.deb (--unpack): trying to overwrite '/usr/lib/python3.6/idlelib/CREDITS.txt', 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/idle-python3.6_3.6.8-1~18.04.york0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
The output of
sudo dpkg --configure -a
is
dpkg: dependency problems prevent configuration of idle:
idle depends on idle-python3.6; however:
Package idle-python3.6 is not installed.
dpkg: error processing package idle (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
idle
The output of cat /etc/apt/sources.list is
deb http://archive.ubuntu.com/ubuntu bionic main universe
deb http://security.ubuntu.com/ubuntu/ bionic-security main universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe
If I try to reinstall with the command:
sudo apt install idle-python3.6
I get this:
dpkg: error processing archive /var/cache/apt/archives/idle-python3.6_3.6.8-1~18.04.york0_all.deb (--unpack):
trying to overwrite '/usr/lib/python3.6/idlelib/CREDITS.txt', 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/idle-python3.6_3.6.8-1~18.04.york0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't know what to do
I think it is the dependency problem due to bad configuration.
You can refer the ubuntu forum which had similar problem :
https://askubuntu.com/questions/1065556/broken-python-dependencies-after-trying-to-re-install
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?
I'm trying to run sudo apt-get purge postgresql*, but I get a dependency error and a suggestion to run sudo apt-get -f install, so I try to run it which gives me:
Unpacking linux-image-3.13.0-63-generic (3.13.0-63.104~precise1) over (3.13.0-63.103) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-63-generic_3.13.0-63.104~precise1_amd64.deb (--unpack):
trying to overwrite '/lib/modules/3.13.0-63-generic/kernel/mm/hwpoison-inject.ko', which is also in package linux-image-extra-3.13.0-63-generic 3.13.0-63.103
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.13.0-63-generic_3.13.0-63.104~precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm on 14.04
It seems there is a problem with installer. This command should help:
sudo dpkg --configure -a
After this, you should be able to install required dependencies
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.