I am trying to fix some issues with broken libs after failed to install another package. I ran sudo apt --fix-broken install and it failed with this result:
dpkg: error processing archive /var/cache/apt/archives/libglx-dev_1.3.2-1_amd64.deb (--unpack):
trying to overwrite '/usr/include/GL/glx.h', which is also in package mesa-common-dev:amd64 20.0.8-0ubuntu1~18.04.1
Preparing to unpack .../libgl-dev_1.3.2-1_amd64.deb ...
Unpacking libgl-dev:amd64 (1.3.2-1) ...
dpkg: error processing archive /var/cache/apt/archives/libgl-dev_1.3.2-1_amd64.deb (--unpack):
trying to overwrite '/usr/include/GL/gl.h', which is also in package mesa-common-dev:amd64 20.0.8-0ubuntu1~18.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libegl-dev_1.3.2-1_amd64.deb ...
Unpacking libegl-dev:amd64 (1.3.2-1) ...
dpkg: error processing archive /var/cache/apt/archives/libegl-dev_1.3.2-1_amd64.deb (--unpack):
trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl1-mesa-dev:amd64 20.0.8-0ubuntu1~18.04.1
Preparing to unpack .../libgles-dev_1.3.2-1_amd64.deb ...
Unpacking libgles-dev:amd64 (1.3.2-1) ...
dpkg: error processing archive /var/cache/apt/archives/libgles-dev_1.3.2-1_amd64.deb (--unpack):
trying to overwrite '/usr/include/GLES2/gl2.h', which is also in package libgles2-mesa-dev:amd64 20.0.8-0ubuntu1~18.04.1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
/var/cache/apt/archives/libglx-dev_1.3.2-1_amd64.deb
/var/cache/apt/archives/libgl-dev_1.3.2-1_amd64.deb
/var/cache/apt/archives/libegl-dev_1.3.2-1_amd64.deb
/var/cache/apt/archives/libgles-dev_1.3.2-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I can not run some applications that require gtk due to that series of libs being broken.
Any suggestions for a fix?
uname -a
Linux ubuntu 5.4.0-84-generic #94~18.04.1-Ubuntu SMP Thu Aug 26 23:17:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I fixed this.
I had to remove some packages with dpkg
sudo dpkg --remove --force-remove-reinstreq libgtk-3-dev
sudo dpkg --remove --force-remove-reinstreq mesa-common-dev
sudo dpkg --remove --force-remove-reinstreq libegl1-mesa-dev
sudo dpkg --remove libgles2-mesa-dev
Then I ran sudo apt --fix-broken install
I had to also run all updates and upgrades to fix everything.
Related
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.
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
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'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 have a server with
Linux version 2.6.32-042stab085.20 (root#rh6-build-x64) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Mar 21 19:07:05 MSK 2014
I always use apt-get update before upgrade, but lastly I am always getting error while upgrading:
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:
libc6 : Breaks: locales (< 2.19)
E: Unmet dependencies. Try using -f.
So I run with -f parameter and get this:
Preparing to unpack .../locales_2.19-11_all.deb ...
Unpacking locales (2.19-11) over (2.13+git20120306-12.1) ...
dpkg: error processing archive /var/cache/apt/archives/locales_2.19-11_all.deb (--unpack):
trying to overwrite '/usr/sbin/update-locale', which is also in package libc-bin 2.19-0ubuntu6.3
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/locales_2.19-11_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Somebody know how to repair it?