安装git时出现JDK相关错误

安装git时出现JDK相关错误

我在 ubuntu 14.04 上使用终端命令安装 git apt-get install git,但输出以下日志显示 JDK 可能有问题,但我的系统上确实安装了 jdk。有人能给我一些关于这个问题的建议吗?

好吧,我已经检查过 git 已经安装成功,但是我不确定将来是否会出现以下奇怪的错误。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-bzr git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 535 not upgraded.
1 not fully installed or removed.
Need to get 3,421 kB of archives.
After this operation, 21.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main git-man all 1:1.9.1-1ubuntu0.2 [699 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main git amd64 1:1.9.1-1ubuntu0.2 [2,701 kB]
Fetched 3,421 kB in 1min 1s (55.4 kB/s)                                        
Selecting previously unselected package liberror-perl.
(Reading database ... 173561 files and directories currently installed.)
Preparing to unpack .../liberror-perl_0.17-1.1_all.deb ...
Unpacking liberror-perl (0.17-1.1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../git-man_1%3a1.9.1-1ubuntu0.2_all.deb ...
Unpacking git-man (1:1.9.1-1ubuntu0.2) ...
Selecting previously unselected package git.
Preparing to unpack .../git_1%3a1.9.1-1ubuntu0.2_amd64.deb ...
Unpacking git (1:1.9.1-1ubuntu0.2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up jdk1.8.0-73 (1.8.073-1) ...
Unpacking JAR files...
    tools.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/lib/tools.pack
    plugin.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/plugin.pack
    javaws.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/javaws.pack
    deploy.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/deploy.pack
    rt.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/rt.pack
    jsse.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/jsse.pack
    charsets.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/charsets.pack
    localedata.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/ext/localedata.pack
    jfxrt.jar...
Error: Could not open input file: /usr/java/jdk1.8.0_73/jre/lib/ext/jfxrt.pack
/var/lib/dpkg/info/jdk1.8.0-73.postinst: line 641: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/info/jdk1.8.0-73.postinst: line 653: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jdk1.8.0-73 (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up liberror-perl (0.17-1.1) ...
Setting up git-man (1:1.9.1-1ubuntu0.2) ...
Setting up git (1:1.9.1-1ubuntu0.2) ...
Errors were encountered while processing:
 jdk1.8.0-73
E: Sub-process /usr/bin/dpkg returned an error code (1)

顺便说一句,当我输入该命令时,我已经拥有 root 权限apt-get install git

相关内容