# 使用 Homebrew, apt, MacPorts, Nix, pacman, scoop, chocolatey 安装 kotlin

查看 kotlin 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:kotlin
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kotlin
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install kotlin
```

  证据: MacPorts ports tree: lang/kotlin/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install kotlin
```

  证据: Debian stable package indexes: kotlin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#kotlin
```

  证据: nixpkgs package indexes: kotlin from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S kotlin
```

  证据: Arch Linux sync databases: kotlin from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/kotlin
```

  证据: Scoop official bucket manifest trees: bucket/kotlin.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- Chocolatey (92%):

```sh
choco install kotlinc
```

  证据: Chocolatey community package catalog: kotlinc from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='10.436','istioctl'

## 软件包事实

- **软件包键:** brew:kotlin
- **软件包管理器:** Homebrew
- **版本:** 2.4.10
- **来源摘要:** Statically typed programming language for the JVM
- **主页:** <https://kotlinlang.org/>
- **仓库:** <https://github.com/JetBrains/kotlin>
- **最后更新:** 2026-07-14T13:11:38Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- kapt (别名)
- kotlin (别名)
- kotlinc (别名)
- kotlinc-js (别名)
- kotlinc-jvm (别名)
- kotlinc-wasm (别名)
- kotlinr (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.4.10
## 项目历史与用法

Kotlin is JetBrains' open-source, statically typed programming language for JVM, Android, JavaScript, Wasm, and Native targets. In package managers, the `kotlin` formula represents the command-line compiler and scripting tools behind a language that moved from JetBrains' internal productivity needs to mainstream Android and multiplatform development.

### 项目历史

JetBrains started Kotlin in 2010 and open-sourced it early in its development. JetBrains' 2011 explanation emphasized internal productivity, Java interoperability, and compilation speed: the company wanted a more expressive language for IntelliJ-based development without abandoning the JVM ecosystem.

Kotlin 1.0 was released on February 15, 2016 as a stable language for JVM and Android development. JetBrains positioned it as a pragmatic language focused on Java interoperability, null-safety, clarity, tooling, and use across server-side, mobile, and desktop applications.

The language broadened after 1.0. Google announced official Android support for Kotlin in May 2017, JetBrains and Google announced the Kotlin Foundation work around the same era, Kotlin/Native and multiplatform support expanded through 2017 and 2018, and Kotlin 2.0 in May 2024 introduced the stable K2 compiler as the default compiler architecture.

### 采用历史

Kotlin's adoption accelerated through Android. The Android team announced official support in 2017, noting production use by companies such as Expedia, Flipboard, Pinterest, and Square. At Google I/O 2019, Google reported that more than 50 percent of professional Android developers used Kotlin and described Android development as increasingly Kotlin-first.

Beyond Android, Kotlin became part of server-side JVM work, Gradle build logic, multiplatform mobile projects, browser and Wasm experiments, and native targets. Package-manager adoption reflects that spread: the formula exposes command-line tools such as `kotlin`, `kotlinc`, `kotlinc-jvm`, `kotlinc-js`, and `kapt` for users who want compiler access outside an IDE.

### 使用方式

The Homebrew formula installs the Kotlin command-line compiler and related launchers. Users run `kotlinc` for compilation, `kotlin` for running Kotlin programs and scripts, target-specific compiler frontends for JVM and JavaScript, and `kapt` for annotation-processing workflows in JVM builds.

### 为什么软件包爱好者会关心

Kotlin is a classic language-runtime package with an unusually strong IDE and Android story. For package nerds, it is notable because a Homebrew formula can give shell access to a language whose day-to-day use is often mediated by Gradle, IntelliJ IDEA, Android Studio, or platform-specific SDKs.

It also illustrates how modern language packages accumulate companion artifacts: Gradle plugins, compiler plugins, `kotlinx` libraries, native toolchains, LSP servers, and IDE integrations all orbit the base compiler package.

### 时间线

- 2010: JetBrains started the Kotlin project.
- 2011-08: JetBrains publicly explained why it was investing in Kotlin.
- 2016-02-15: Kotlin 1.0 was released.
- 2017-05: Android announced official Kotlin support.
- 2018-10: Kotlin 1.3 shipped with stable coroutines and Kotlin/Native Beta.
- 2019-05: Google reported Kotlin-first Android momentum at Google I/O 2019.
- 2024-05: Kotlin 2.0 shipped with the stable K2 compiler.
- 2026-06-03: Kotlin 2.4.0 was released.

### Related projects

- Kotlin is related to JetBrains IntelliJ IDEA, Android Studio, Gradle, Kotlin Multiplatform, Kotlin/Native, Kotlin/JS, Kotlin/Wasm, Ktor, kotlinx.coroutines, kapt, KSP, and the Kotlin Language Server.

### 来源

- <https://android-developers.googleblog.com/2017/05/android-announces-support-for-kotlin.html>
- <https://android-developers.googleblog.com/2019/05/google-io-2019-empowering-developers-to-build-experiences-on-Android-Play.html>
- <https://blog.jetbrains.com/kotlin/2011/08/why-jetbrains-needs-kotlin/>
- <https://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-released-pragmatic-language-for-jvm-and-android/>
- <https://blog.jetbrains.com/kotlin/2018/10/kotlin-1-3/>
- <https://blog.jetbrains.com/kotlin/2024/05/celebrating-kotlin-2-0-fast-smart-and-multiplatform/>
- <https://kotlinlang.org/docs/faq.html>
- <https://kotlinlang.org/docs/releases.html>


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 其他软件包管理器记录

- Debian apt - kotlin - 1.3.31+ds1-3: normalized package name match | Debian stable package indexes: kotlin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | cross-platform, general-purpose programming language | https://kotlinlang.org
- Nix - kotlin: normalized package name match | nixpkgs package indexes: kotlin from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - kotlin - 1.3.31+ds1-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: kotlin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | cross-platform, general-purpose programming language | https://kotlinlang.org
- pacman - kotlin - 2.4.10-1: normalized package name match | Arch Linux sync databases: kotlin from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Statically typed programming language with multiplatform support | https://kotlinlang.org/
- MacPorts - kotlin: normalized package name match | MacPorts ports tree: lang/kotlin/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/kotlin: normalized package name match | Scoop official bucket manifest trees: bucket/kotlin.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- Chocolatey - kotlinc: installed executable or alias match | Chocolatey community package catalog: kotlinc from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='10.436','istioctl'


## Combined YAML source

View the package source record on GitHub. [combined/kotlin.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kotlin.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
