Skip to content

Commit

Permalink
Update Linux installaiton steps
Browse files Browse the repository at this point in the history
Fixes sbt/sbt#4261
Fixes sbt#799

Ideally

```
sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
```

should just work. but Ubuntu Bionic (18.04) uses gpg 2.2.4 that does not contain the fix mentioned in microsoft/WSL#3286, and thus end up with

```
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.BG01sRSmD5/S.dirmngr' failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr
```
  • Loading branch information
eed3si9n committed Sep 22, 2019
1 parent 1de2a0b commit a239e75
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/nanoc/content/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3>Scoop</h3>
<h2>Linux (deb)</h2>
<pre>
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt
</pre>
Expand Down
26 changes: 20 additions & 6 deletions src/reference/00-Getting-Started/01-Setup/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,29 @@ out: Installing-sbt-on-Linux.html
Installing sbt on Linux
-----------------------

### Installing from a universal package
### Installing from SDKMAN

Download [ZIP][ZIP] or [TGZ][TGZ] package and expand it.
To install both JDK and sbt, consider using [SDKMAN](https://sdkman.io/).

```
\$ sdk list java
\$ sdk install java 11.0.4.hs-adpt
\$ sdk install sbt
```

This has two advantages.
1. It will install the official packaging by AdoptOpenJDK, as opposed to the ["mystery meat OpenJDK builds"](https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-May/009330.html).
2. It will install `tgz` packaging of sbt that contains all JAR files. (DEB and RPM packages do not to save bandwidth)

### Install JDK

You must first install a JDK. We recommend AdoptOpenJDK JDK 8 or JDK 11. The details around the package names differ from one distribution to another.
You must first install a JDK. We recommend **AdoptOpenJDK JDK 8** or **JDK 11**.

For example, Ubuntu xenial (16.04LTS) has [openjdk-8-jdk](https://packages.ubuntu.com/hu/xenial/openjdk-8-jdk).
The details around the package names differ from one distribution to another. For example, Ubuntu xenial (16.04LTS) has [openjdk-8-jdk](https://packages.ubuntu.com/hu/xenial/openjdk-8-jdk). Redhat family calls it [java-1.8.0-openjdk-devel](https://apps.fedoraproject.org/packages/java-1.8.0-openjdk-devel).

Redhat family calls it [java-1.8.0-openjdk-devel](https://apps.fedoraproject.org/packages/java-1.8.0-openjdk-devel).
### Installing from a universal package

Download [ZIP][ZIP] or [TGZ][TGZ] package and expand it.

### Ubuntu and other Debian-based distributions

Expand All @@ -33,7 +45,7 @@ Ubuntu and other Debian-based distributions use the DEB format, but usually you
Run the following from the terminal to install `sbt` (You'll need superuser privileges to do so, hence the `sudo`).

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt

Expand All @@ -45,6 +57,8 @@ Once `sbt` is installed, you'll be able to manage the package in `aptitude` or S

**Note**: There's been reports about SSL error using Ubuntu: `Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom`, which apparently stems from OpenJDK 9 using PKCS12 format for `/etc/ssl/certs/java/cacerts` [cert-bug][cert-bug]. According to <https://stackoverflow.com/a/50103533/3827> it is fixed in Ubuntu Cosmic (18.10), but Ubuntu Bionic LTS (18.04) is still waiting for a release. See the answer for a woraround.

**Note**: `sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823` may not work on Ubuntu Bionic LTS (18.04) since it's using a buggy GnuPG, so we are advising to use web API to download the public key in the above.

### Red Hat Enterprise Linux and other RPM-based distributions

[RPM][RPM] package is officially supported by sbt.
Expand Down
23 changes: 18 additions & 5 deletions src/reference/es/00-Getting-Started/01-Setup/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,34 @@ out: Installing-sbt-on-Linux.html
Installing sbt on Linux
-----------------------

### Instalar desde un paquete universal
### Installing from SDKMAN

Descarga el paquete [ZIP][ZIP] o [TGZ][TGZ] y descomprímelo.
To install both JDK and sbt, consider using [SDKMAN](https://sdkman.io/).

```
\$ sdk list java
\$ sdk install java 11.0.4.hs-adpt
\$ sdk install sbt
```

This has two advantages.
1. It will install the official packaging by AdoptOpenJDK, as opposed to the ["mystery meat OpenJDK builds"](https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-May/009330.html).
2. It will install `tgz` packaging of sbt that contains all JAR files. (DEB and RPM packages do not to save bandwidth)

### Instalar JDK

Primero desberás de instalar JDK. Recomendamos AdoptOpenJDK JDK 8 u AdoptOpenJDK JDK 11.
Los detalles sobre el nombre de los paquetes cambian de una distribución a otra.

Los detalles sobre el nombre de los paquetes cambian de una distribución a otra.
Por ejemplo, Ubuntu xenial (16.04LTS) usa
[openjdk-8-jdk](https://packages.ubuntu.com/hu/xenial/openjdk-8-jdk).

La familia Redhat lo llama
[java-1.8.0-openjdk-devel](https://apps.fedoraproject.org/packages/java-1.8.0-openjdk-devel).

### Instalar desde un paquete universal

Descarga el paquete [ZIP][ZIP] o [TGZ][TGZ] y descomprímelo.

### Ubuntu y otras distribuciones basadas en Debian

Los paquetes [DEB][DEB] son oficialmente soportados por sbt.
Expand All @@ -41,7 +54,7 @@ Ejecuta lo siguiente desde el terminal para instalar `sbt`
(necesitarás tener privilegios de administrador para hacerlo, de ahí el `sudo`).

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt

Expand Down
24 changes: 17 additions & 7 deletions src/reference/ja/00-Getting-Started/01-Setup/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,25 @@ out: Installing-sbt-on-Linux.html
Linux への sbt のインストール
--------------------------

### JDK のインストール
### SDKMAN からのインストール

JDK と sbt をするのに、[SDKMAN](https://sdkman.io/) の導入を検討してほしい。

```
\$ sdk list java
\$ sdk install java 11.0.4.hs-adpt
\$ sdk install sbt
```

まず JDK をインストールする必要がある。AdoptOpenJDK JDK 8 もしくは AdoptOpenJDK JDK 11 を推奨する。パッケージ名はディストリビューションによって異なる。
この方法は 2つの利点がある。
1. [「闇鍋 OpenJDK ビルド」](https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-May/009330.html)と揶揄されているディストロ管理の JDK ではなく、AdoptOpenJDK が出している公式のパッケージをインストールできる。
2. sbt の全ての JAR ファイルを含んだ `tgz` パッケージをインストールできる (DEB と RPM版は帯域の節約のために JAR ファイルが含まれていない)。

例えば、Ubuntu xenial (16.04LTS) には [openjdk-8-jdk](https://packages.ubuntu.com/hu/xenial/openjdk-8-jdk) がある。
### JDK のインストール

まず JDK をインストールする必要がある。AdoptOpenJDK JDK 8 もしくは AdoptOpenJDK JDK 11 を推奨する。

Redhat 系は [java-1.8.0-openjdk-devel](https://apps.fedoraproject.org/packages/java-1.8.0-openjdk-devel) と呼んでいる。
パッケージ名はディストリビューションによって異なる。例えば、Ubuntu xenial (16.04LTS) には [openjdk-8-jdk](https://packages.ubuntu.com/hu/xenial/openjdk-8-jdk) がある。Redhat 系は [java-1.8.0-openjdk-devel](https://apps.fedoraproject.org/packages/java-1.8.0-openjdk-devel) と呼んでいる。

### ユニバーサルパッケージからのインストール

Expand All @@ -36,16 +48,14 @@ Ubuntu 及びその他の Debian ベースのディストリビューション
ターミナル上から以下を実行すると `sbt` をインストールできる (superuser 権限を必要とするため、`sudo` を使っている)。

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt

パッケージ・マネージャは設定されたリポジトリに指定されたパッケージがあるか確認しにいく。
sbt のバイナリは Bintray にて公開されており、都合の良いことに Bintray は APT リポジトリを提供している。
そのため、このリポジトリをパッケージ・マネージャに追加しさえすればよい。

>**注意** [sbt/website#127][website127] で報告されている通り、https を使用するとセグメンテーション違反が発生する場合がある。
`sbt` を最初にインストールした後は、このパッケージは `aptitude` や Synaptic
上から管理することができる (パッケージ・キャッシュの更新を忘れずに)。
追加された APT リポジトリは「システム設定 -> ソフトウェアとアップデート -> 他のソフトウェア」 の一番下に表示されているはずだ:
Expand Down
16 changes: 15 additions & 1 deletion src/reference/zh-cn/00-Getting-Started/01-Setup/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ out: Installing-sbt-on-Linux.html
在 Linux 上安装 sbt
-----------------------

### Installing from SDKMAN

To install both JDK and sbt, consider using [SDKMAN](https://sdkman.io/).

```
\$ sdk list java
\$ sdk install java 11.0.4.hs-adpt
\$ sdk install sbt
```

This has two advantages.
1. It will install the official packaging by AdoptOpenJDK, as opposed to the ["mystery meat OpenJDK builds"](https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-May/009330.html).
2. It will install `tgz` packaging of sbt that contains all JAR files. (DEB and RPM packages do not to save bandwidth)

### 通过通用的安装包安装

下载 [ZIP][ZIP] 或者 [TGZ][TGZ] 包并解压。
Expand All @@ -22,7 +36,7 @@ Ubuntu和其他基于Debian的发行版使用DEB格式,但通常你不从本
从终端运行下面的命令安装`sbt`(你需要超级用户权限,因此需要`sudo`)。

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt

Expand Down

0 comments on commit a239e75

Please sign in to comment.