例如:
$ sudo apt-get install curl
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:
bsh : Depends: libjline-java but it is not going to be installed
groovy : Depends: libjline-java but it is not going to be installed
rhino : Depends: libjline-java but it is not going to be installed
E: Unmet dependencies.
Try 'apt-get -f install' with no packages (or specify a solution).
尝试安装clojure1.3,leiningen和其他几个软件包时,我得到相同或相似的错误。
当我尝试错误消息中的建议时,会发生以下情况:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libjline-java
Suggested packages:
libjline-java-doc
The following NEW packages will be installed:
libjline-java
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
23 not fully installed or removed.
Need to get 0 B/72.0 kB of archives.
After this operation, 129 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 226243 files and directories currently installed.)
Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):
trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400
Errors were encountered while processing:
/var/cache/apt/archives/libjline-java_1.0-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ 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:
bsh : Depends: libjline-java but it is not installed
groovy : Depends: libjline-java but it is not installed
rhino : Depends: libjline-java but it is not installed
E: Unmet dependencies. Try using -f.
看上去也很生动,您需要安装Java,并在软件中心中进行搜索
—
Mark Kirby 2012年
@markkirby,
—
missingfaktor 2012年
sudo apt-get update
如果您正在问我,我已经跑了。
@markkirby,已安装JDK。
—
missingfaktor 2012年