sudo apt-get install openjdk-7-jre-headless总提示包相关的问题,怎么办?

各位麒麟大侠:
我是国产操作系统新用户,在优麒麟上使用sudo apt-get install openjdk-7-jre-headless时出现相关的包没有安装,我先安装这些包,但又会出现其他的包相关未安装。请问有没有什么命令能自动的把相关的包一起安装,谢谢。

sudo apt-get install openjdk-7-jre-headless
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:
eclipse : Depends: eclipse-jdt (>= 3.8.1-5.1) but it is not going to be installed
Depends: eclipse-pde (>= 3.8.1-5.1) but it is not going to be installed
openjdk-7-jre-headless : Depends: ca-certificates-java but it is not going to be installed
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-jamvm (= 7u55-2.4.7-1ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

顺带一个问题,我用优麒麟上网,这个发帖页面不能上传图片。

先这样sudo apt-get install openjdk-7-jre-headless 然后sudo apt-get -f install
我装其他软件的时候经常抱这种错,你按照它的提示来

谢谢!按照您的方法解决了。太感谢了!