-1

I have been trying to figure out how to fix a broken dependency problem that wont allow me to upgrade or install anything else until the issue is resolve.
I have been trying to uninstall and removing everything that relies on the package that is in the issue but it's turned into a missing package.

I have tried to figure out on my own for the last week and I'm hitting a wall. I'd prefer not to reinstall my full OS, does anyone know how to fix this issue?

Here is the output of the apt-get errors received:

root@catch22:~# apt-get update && apt-get upgrade -y
Hit:1 http://old.kali.org/kali sana InRelease
Hit:2 http://old.kali.org/kali moto InRelease                            
Hit:3 http://archive-12.kali.org/kali kali-rolling InRelease                   
Hit:4 http://archive-9.kali.org/kali kali-bleeding-edge InRelease
Reading package lists... Done        
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:
 libmail-java : Depends: libactivation-java but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

root@catch22:~# apt--fix-broken install
bash: apt--fix-broken: command not found
root@catch22:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libradare2-2.3
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libactivation-java
The following NEW packages will be installed:
  libactivation-java
0 upgraded, 1 newly installed, 0 to remove and 409 not upgraded.
97 not fully installed or removed.
Need to get 0 B/84.8 kB of archives.
After this operation, 152 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 544400 files and directories currently installed.)
Preparing to unpack .../libactivation-java_1.2.0-1_all.deb ...
Unpacking libactivation-java (1.2.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/libactivation-java_1.2.0-1_all.deb (--unpack):
 trying to overwrite '/usr/share/maven-repo/javax/activation/activation/debian/activation-debian.pom', which is also in package glassfish-activation 1:2.1.1-b31g+dfsg1-2
Errors were encountered while processing:
 /var/cache/apt/archives/libactivation-java_1.2.0-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

at this point it wont allow me to remove the glassfish package that way is there any other way to remove glassfish like perhaps 'dpkg' because I keep getting this dependency problem when trying to install, remove or upgrade anything with 'apt' or 'apt-get' this is the output;

root@catch22:~# apt remove glassfish-activation
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:
 libmail-java : Depends: libactivation-java but it is not going to be                                 installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or     specify a solution).
  • 1
    If you are using Kali linux this is normal Kali is really hard to set up and maintain when you install unsupported packages. Also could you please take the time to learn how to format your post. It's bearly readable and it's about Kali very few chances anyone answer. – Kiwy Mar 20 '18 at 13:26
  • 2
    Possible duplicate of Why is Kali Linux so hard to set up? Why won't people help me? – Kiwy Mar 20 '18 at 13:27
  • thanks kiwi I never ran into this issue been using kali on this PC since 2015 and I have yet to run into this issue – P. Griffin Mar 20 '18 at 13:34
  • 1
    Kali has never been intended to be use as a main desktop on which you install anything and go on facebook, it's a work tool such as a hammer for the carpenter, and you never see a carpenter pimping its hammer with fur and nail for exemple because it wouldn't help and eventuallly make the hammer unusable... Same apply to Kali install it use it, do as few modification as possible or you could make it unusable quiet easilly. – Kiwy Mar 20 '18 at 13:38
  • 2
    @Kiwy please don’t reach for the Kali dupe all the time — if a question is answerable, it deserves an answer IMO. I think a useful way to consider Kali questions is “would we answer this question if it wasn’t about Kali?” If the answer is yes, then in many cases the question shouldn’t be closed as a dupe of the “Kali is hard” question. – Stephen Kitt Mar 20 '18 at 14:31
3

You need to remove the obsolete glassfish-activation package:

apt remove glassfish-activation

This will allow you to install libactivation-java.

  • at this point it wont allow me to remove the glassfish package that way is there any other way to remove glassfish like perhaps 'dpkg' because I keep getting this dependency problem when trying to install or remove anything with 'apt' or 'apt-get' this is the output; – P. Griffin Mar 21 '18 at 11:58
  • dpkg --purge glassfish-activation, but that will fail if anything depends on the package; you can force the issue with dpkg --purge --force-depends glassfish-activation (and be prepared to fix whatever issues that causes). – Stephen Kitt Mar 23 '18 at 9:36
1

Your problem should be marked as a Duplicate. If you had spent any time looking at previous posts on this site you would have seen e.g. apt-get update is not working

From your code, you can clearly see that you have THREE repositories. Sana, Moto AND Rolling. You should only have ONE.

DON'T MIX YOUR REPOSITORIES!

  • This is good advice. – Tim_Stewart Mar 22 '18 at 20:26
  • This book is written to help first-time Linux users, as well as current Kali users seeking to deepen their knowledge about the underpinnings of Kali, as well as those who have used Kali for years but who are looking to formalize their learning, expand their use of Kali, and fill in gaps in their knowledge. - johnny long kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf – Tim_Stewart Mar 22 '18 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.