我将其发布为可能的错误报告,因为this page说,
问题排查
请在我们的StackOverflow页面上报告任何问题:https://stackoverflow.com/questions/tagged/corda
也许这些在Ubuntu上安装Java的指示是错误的(过时的):
https://docs.corda.net/getting-set-up.html#id4
Java
- 打开一个新终端,然后通过键入
sudo add-apt-repository ppa:webupd8team/java
将Oracle PPA添加到您的存储库中。出现提示时按Enter。- 使用命令
更新您的包裹清单sudo apt update
- 通过键入
sudo apt install oracle-java8-installer
安装Oracle JDK 8。- 在出现提示时按Y,并同意许可条款。
因为这样做的结果如下:
cwellsx@cwellsx-VirtualBox:~$ sudo add-apt-repository ppa:webupd8team/java
[sudo] password for cwellsx:
The Oracle JDK License has changed for releases starting April 16, 2019.
The new Oracle Technology Network License Agreement for Oracle Java SE is substantially different from prior Oracle JDK licenses. The new license permits certain uses, such as personal use and development use, at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer be available. Please review the terms carefully before downloading and using this product. An FAQ is available here: https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html
Oracle Java downloads now require logging in to an Oracle account to download Java updates, like the latest Oracle Java 8u211 / Java SE 8u212. Because of this I cannot update the PPA with the latest Java (and the old links were broken by Oracle).
For this reason, THIS PPA IS DISCONTINUED (unless I find some way around this limitation).
Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK8). There are no actual Java files in this PPA.
Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html
Update: Oracle Java 9 has reached end of life: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
The PPA supports Ubuntu 18.10, 18.04, 16.04, 14.04 and 12.04.
More info (and Ubuntu installation instructions):
- http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
Debian installation instructions:
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
For Oracle Java 11, see a different PPA -> https://www.linuxuprising.com/2019/06/new-oracle-java-11-installer-for-ubuntu.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:1 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease [15,4 kB]
Get:3 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Get:4 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Get:6 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [713 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [22,6 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [10,4 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [31,7 kB]
Get:10 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [574 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,1 kB]
Get:12 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [285 kB]
Get:13 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [70,9 kB]
Get:14 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB]
Get:15 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [978 kB]
Get:16 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16,4 kB]
Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [116 kB]
Get:18 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2 464 B]
Get:19 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1 000 kB]
Get:20 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [253 kB]
Get:21 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [193 kB]
Get:22 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [453 kB]
Get:23 http://fr.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2 468 B]
Get:24 http://fr.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7 920 B]
Fetched 5 179 kB in 6s (924 kB/s)
Reading package lists... Done
cwellsx@cwellsx-VirtualBox:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Hit:2 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
cwellsx@cwellsx-VirtualBox:~$ sudo apt install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'oracle-java8-installer' has no installation candidate
cwellsx@cwellsx-VirtualBox:~$
也许(如果我错了,请纠正我)现在的方法是:
*.tar.gz
解压缩:
cwellsx@cwellsx-VirtualBox:~$ sudo mkdir /opt/java
cwellsx@cwellsx-VirtualBox:~$ sudo tar -zxf Downloads/jdk-8u221-linux-x64.tar.gz -C /opt/java
将以下内容添加到/etc/profile
# after `sudo tar -zxf Downloads/jdk-8u221-linux-x64.tar.gz -C /opt/java`
export JAVA_HOME=/opt/java/jdk1.8.0_221
export PATH=$PATH:$JAVA_HOME/bin
重新启动Ubuntu
验证
cwellsx@cwellsx-VirtualBox:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/java/jdk1.8.0_221/bin
cwellsx@cwellsx-VirtualBox:~$ java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
...类似于Windows的安装说明。
答案 0 :(得分:0)
感谢您的笔记和贡献!
我将把注释传递给文档小组并进行相应的更改。