Setup Clojure


Windows

scoop

  • Win + R : powershell
    Set-ExecutionPolicy RemoteSigned -scope CurrentUser
    iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  • Win + R : cmd
> scoop install git
> scoop bucket  add java
> scoop bucket  add extras
> scoop bucket  add scoop-clojure https://github.com/littleli/scoop-clojure
> scoop install temurin-lts-jdk
> scoop install clj-deps
> scoop update  clj-deps

Ubuntu

sudo apt install -y wget apt-transport-https
sudo mkdir -p /etc/apt/keyrings
sudo wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
sudo echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt update # update if you haven't already
sudo apt search temurin

sudo apt install -y ์›ํ•˜๋Š”_๋ฒ„์ „_์„ ํƒ
sources.list
ํŒŒ์ผ/etc/apt/sources.list
๋””๋ ‰ํ† ๋ฆฌ/etc/apt/sources.list.d/
  • Eclipse Temurin์€ Adoptium์—์„œ ์ œ๊ณตํ•˜๋Š” OpenJDK ๋ฐฐํฌํŒ์˜ ์ด๋ฆ„
    • adoptium
      • Oracle OpenJDK์™€ ํ˜ธํ™˜๋˜๋Š” ์ž๋ฐ” ๊ฐœ๋ฐœ ํ‚คํŠธ(Java Development Kit, JDK)๋ฅผ ์ œ๊ณต
      • ์ด์ „์— AdoptOpenJDK๋กœ ์•Œ๋ ค์ ธ ์žˆ์—ˆ์Œ
OpenJ9HotSpot
JVMIBM์—์„œ ๊ฐœ๋ฐœํ•œ JVMJVM์€ ์˜ค๋žซ๋™์•ˆ ์ž๋ฐ”์˜ ๊ธฐ๋ณธ JVM
GCEclipse OpenJ9์ฃผ๋กœ ๊ธฐ๋ณธ ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ ๋ฐฉ์‹
LicenseEclipse Public License (EPL)Oracle Binary Code License (BCL)
GNU General Public License (GPL)GNU General Public License (GPL)
GNU General Public License with Classpath Exception (GPL+CE) - JDK only
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/iv/.bashrc
$ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
$ sudo apt-get install build-essential
$ brew install gcc
$ brew install clojure/tools/clojure
$ clj
Clojure 1.11.1
user=>

macOs

$ brew install clojure/tools/clojure # ์„ค์น˜์‹œ
$ brew update clojure/tools/clojure  # ์—…๋ฐ์ดํŠธ์‹œ

$ clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
$ clojure -Tnew app :name myusername/mynewapp
$ cd mynewapp
$ clj -X:run-x
Hello, Clojure!