Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 12.04 LTS. if more information will be needed, tell me and'll give.

the main problem is:

tzach@tzach-pc:~$ sudo apt-get install docky
[sudo] password for tzach: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
docky is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 ca-certificates-java : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not going to be installed or
                                 java6-runtime-headless
 openjdk-7-jre-lib : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
tzach@tzach-pc:~$

and also:

tzach@tzach-pc:~$ sudo apt-get upgrade
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:
ca-certificates-java : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not installed or
java6-runtime-headless
openjdk-7-jre-lib : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not installed
E: Unmet dependencies. Try using *******

so we tryied the guide here in messege #9: http://ubuntuforums.org/showthread.php?t=947124

we run all the first 4 commands and the last one-"sudo apt-get autoremove" gave us:

tzach@tzach-pc:~$ sudo apt-get autoremove
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:
 **ca-certificates-java** : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not installed or
                                 java6-runtime-headless
 **openjdk-7-jre-lib** : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not installed
E: Unmet dependencies. Try using -f.

so we run the last command twice: sudo dpkg --remove -force --force-remove-reinstreq ca-certificates-java and sudo dpkg --remove -force --force-remove-reinstreq openjdk-7-jre-lib

but both of them gives:

tzach@tzach-pc:~$ sudo dpkg --remove -force --force-remove-reinstreq ca-certificates-java
[sudo] password for tzach: 
dpkg: error: conflicting actions -f (--field) and -r (--remove)

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through `less' or `more' !

EDIT FOR green7-output of "sudo apt-get -f install":

tzach@tzach-pc:~$ sudo apt-get -f install
[sudo] password for tzach: 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
icedtea-7-jre-cacao icedtea-7-jre-jamvm java-common openjdk-7-jre-headless
tzdata-java
Suggested packages:
default-jre equivs sun-java6-fonts ttf-dejavu-extra fonts-ipafont-gothic
fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts
ttf-bengali-fonts
The following packages will be REMOVED:
ttf-mscorefonts-installer
The following NEW packages will be installed:
icedtea-7-jre-cacao icedtea-7-jre-jamvm java-common openjdk-7-jre-headless
tzdata-java
0 upgraded, 5 newly installed, 1 to remove and 355 not upgraded.
5 not fully installed or removed.
Need to get 0 B/29.6 MB of archives.
After this operation, 88.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: warning: there's no installed package matching ttf-mscorefonts-installer:amd64
Setting up tzdata (2012e-0ubuntu0.12.04) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing tzdata (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
tzdata
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT2 FOR green7:

tzach@tzach-pc:~$ sudo apt-get remove --purge tzdata
[sudo] password for tzach:
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:
ca-certificates-java : Depends: openjdk-6-jre-headless (>= 6b16-1.6.1-2) but it is not going to be installed or
java6-runtime-headless
libc6 : Depends: tzdata but it is not going to be installed
libc6:i386 : Depends: tzdata:i386
libical0 : Depends: tzdata but it is not going to be installed
openjdk-7-jre-lib : Depends: openjdk-7-jre-headless (>= 7~b130~pre0) but it is not going to be installed
python-dateutil : Depends: tzdata but it is not going to be installed
ubuntu-minimal : Depends: tzdata but it is not going to be installed
util-linux : Depends: tzdata (>= 2006c-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

EDIT3 FOR green7:

tzach@tzach-pc:~$ sudo apt-get install openjdk-7-jre-headless
[sudo] password for tzach:
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:
openjdk-7-jre-headless : Depends: tzdata-java but it is not going to be installed
Depends: java-common (>= 0.28) but it is not going to be installed
Recommends: icedtea-7-jre-cacao (= 7~u3-2.1.1~pre1-1ubuntu3) but it is not going to be installed
Recommends: icedtea-7-jre-jamvm (= 7~u3-2.1.1~pre1-1ubuntu3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

some things in the text also supposed to be bolded. but not critic (: Thanks for the editing!

Thanks a lot for your assistance.

share|improve this question
    
Did you try sudo apt-get -f install? –  green7 Aug 24 '12 at 10:55
    
Yes. I edited now and put the output. Thanks. –  yinon Aug 24 '12 at 11:26
    
You're missing a dash in "-force", this is interpreted as the equivalent of "-f -o -r c -e" -- do you get the same error (conflicting actions...) with "--force"? –  Tom Regner Aug 30 '12 at 10:51
add comment

6 Answers

Try removing the package tzdata which might be causing the problem:

sudo apt-get remove --purge tzdata
share|improve this answer
    
OK. I tried and it's showing a a similar error. I edited and put the output. –  yinon Aug 24 '12 at 16:05
    
Try sudo apt-get install openjdk-7-jre-headless –  green7 Aug 24 '12 at 16:18
    
run it. the output (I edited) is now a bit different but still similar. Thanks for your answers. –  yinon Aug 24 '12 at 16:42
    
can you please come on IRC? So that you can try it in real time? –  green7 Aug 24 '12 at 18:11
    
Sorry to not be here for a while. At first I thought that it hav'nt worked but finally, after some time the problem fixed!! Now everything Is okey. Thanks! you are a great man! –  yinon Aug 29 '12 at 18:58
add comment

Try This

sudo mv /var/lib/dpkg/info/tzdata.prerm ~/tzdata.prerm

sudo dpkg-reconfigure tzdata --force

sudo dpkg --purge --force-all tzdata
share|improve this answer
add comment

Try

rm /var/lib/apt/lists/* -vf  
apt-get update 
share|improve this answer
add comment

to remove a package misconfigured or improperly installed can run the following

sudo aptitude purge $(dpkg -l|grep ^rc|awk '{ print $2 }')
share|improve this answer
add comment

I had a little bit different issue with package, but solved it by this:

sudo dpkg --remove <conflicted-package-name>
sudo apt-get install -f

And it's fixed.

share|improve this answer
add comment

Looks like I had same problem but with other package. It was called java7-oracle-installer (NEVER INSTALL IT) and I could not even remove package (?!) because I was getting a error code 1 on dpkg. I had to reinstall system, because I could not install or delete anything. I prefer reinstalling system.

share|improve this answer
    
I prefer to solve it even that it sound easier. If the solution will be here, me and many others would be able to use it and "have fun" (: –  yinon Aug 24 '12 at 16:35
    
That was solution for me, looks same here, so sorry bro. –  Xylo Aug 24 '12 at 16:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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