Instantly share code, notes, and snippets.

Embed
What would you like to do?
Instructions for installing Elm 0.19 on Linux

Install on Linux

Elm 0.19 just came out, so the npm installer is not ready yet. In the meantime, you can download it manually like this:

wget "https://github.com/elm/compiler/releases/download/0.19.0/binaries-for-linux.tar.gz"
tar xzf binaries-for-linux.tar.gz
mv elm /usr/local/bin/

Moving the binary to /usr/local/bin should make it available on your PATH so you can call it from anywhere.

@fabienengels

This comment has been minimized.

Show comment
Hide comment
@fabienengels

fabienengels Aug 21, 2018

Congrats for this new version ! Do you plan to continue to distribute this binary even when the npm installer will be ready ? It's nice to just have a binary to copy and not to deal with npm :)

fabienengels commented Aug 21, 2018

Congrats for this new version ! Do you plan to continue to distribute this binary even when the npm installer will be ready ? It's nice to just have a binary to copy and not to deal with npm :)

@romanzolotarev

This comment has been minimized.

Show comment
Hide comment
@romanzolotarev

romanzolotarev Aug 21, 2018

@evancz do you use GHC 7.10 to build ElmPlatform?

Trying to build it on OpenBSD, following this guide:
https://raw.githubusercontent.com/elm/elm-lang.org/master/README.md

romanzolotarev commented Aug 21, 2018

@evancz do you use GHC 7.10 to build ElmPlatform?

Trying to build it on OpenBSD, following this guide:
https://raw.githubusercontent.com/elm/elm-lang.org/master/README.md

@eloraiby

This comment has been minimized.

Show comment
Hide comment
@eloraiby

eloraiby Aug 23, 2018

@evancz I would second that, having just the binaries instead of npm universe is better

eloraiby commented Aug 23, 2018

@evancz I would second that, having just the binaries instead of npm universe is better

@ganwell

This comment has been minimized.

Show comment
Hide comment
@ganwell

ganwell Aug 23, 2018

Just for anyone who didn't get it (like me at first): all the binaries we had for 0.18 are merge into a single one: elm

ganwell commented Aug 23, 2018

Just for anyone who didn't get it (like me at first): all the binaries we had for 0.18 are merge into a single one: elm

@OnorioCatenacci

This comment has been minimized.

Show comment
Hide comment
@OnorioCatenacci

OnorioCatenacci Aug 23, 2018

Thanks for this @evancz. Worked like a charm.

OnorioCatenacci commented Aug 23, 2018

Thanks for this @evancz. Worked like a charm.

@katofares

This comment has been minimized.

Show comment
Hide comment
@katofares

katofares Aug 24, 2018

I have this problem but I can't understand why???
elm-error

even from my browser I can't connect to the elm packages(https://package.elm-lang.org/) !!
anyone had this prolem? any help???

katofares commented Aug 24, 2018

I have this problem but I can't understand why???
elm-error

even from my browser I can't connect to the elm packages(https://package.elm-lang.org/) !!
anyone had this prolem? any help???

@juhp

This comment has been minimized.

Show comment
Hide comment
@juhp

juhp Aug 29, 2018

+1 for downloadable binaries

juhp commented Aug 29, 2018

+1 for downloadable binaries

@dela3499

This comment has been minimized.

Show comment
Hide comment
@dela3499

dela3499 Aug 30, 2018

Perhaps I made a mistake while uninstalling my previous Elm version, but I needed to run

hash elm

before bash would recognize the location of the new elm binary at /usr/local/bin. (See Stack Overflow answer)

dela3499 commented Aug 30, 2018

Perhaps I made a mistake while uninstalling my previous Elm version, but I needed to run

hash elm

before bash would recognize the location of the new elm binary at /usr/local/bin. (See Stack Overflow answer)

@ethagnawl

This comment has been minimized.

Show comment
Hide comment
@ethagnawl

ethagnawl Aug 30, 2018

Works like a charm!

I do have some feedback, though.

1.) Perhaps "binaries-for-linux.tar.gz" should be changed to something a bit more descriptive (e.g. elm-0.19.binaries-for-linux.tar.gz) or the wget example should make use of the -O flag (e.g. wget -O elm-0.19-binaries.targ.gz "https://github.com/elm/compiler/releases/download/0.19.0/binaries-for-linux.tar.gz")? It's not inconceivable that the user could already have a file named binaries-for-linux.tar.gz on their system.
2.) Either prefix the mv command with sudo or mention that it may be required. Alternatively, consider suggesting the user place the binary in a directory they own (e.g. ~/bin).

ethagnawl commented Aug 30, 2018

Works like a charm!

I do have some feedback, though.

1.) Perhaps "binaries-for-linux.tar.gz" should be changed to something a bit more descriptive (e.g. elm-0.19.binaries-for-linux.tar.gz) or the wget example should make use of the -O flag (e.g. wget -O elm-0.19-binaries.targ.gz "https://github.com/elm/compiler/releases/download/0.19.0/binaries-for-linux.tar.gz")? It's not inconceivable that the user could already have a file named binaries-for-linux.tar.gz on their system.
2.) Either prefix the mv command with sudo or mention that it may be required. Alternatively, consider suggesting the user place the binary in a directory they own (e.g. ~/bin).

@remarbach

This comment has been minimized.

Show comment
Hide comment
@remarbach

remarbach Sep 4, 2018

0.19 elm reactor is missing the --address=0.0.0.0 flag. I need this functionality because I develop on a linode server using a browser on a chromebook.

remarbach commented Sep 4, 2018

0.19 elm reactor is missing the --address=0.0.0.0 flag. I need this functionality because I develop on a linode server using a browser on a chromebook.

@AlmightyFloppyFish

This comment has been minimized.

Show comment
Hide comment
@AlmightyFloppyFish

AlmightyFloppyFish Sep 4, 2018

Not having to touch npm to install elm is a huge bonus for me!

AlmightyFloppyFish commented Sep 4, 2018

Not having to touch npm to install elm is a huge bonus for me!

@dtonhofer

This comment has been minimized.

Show comment
Hide comment
@dtonhofer

dtonhofer Sep 18, 2018

Installing elm 0.19.0 using npm seems to work now (2018-09-18). (Can you even add properly add elm modules without npm?)

Repeat of my installation instructions on Fedora 28:

  • I install in the home directory of user devman, which is the user whose mission is to explore new worlds and new civilizations.
  • Goal: to have an installation like the following: All the stuff under ~/node/infrastructure, with symlinks pointing to the currently used version:
node
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       ├── include
│       ├── lib
│       └── share
└── node-v10 -> infrastructure/node-v10.10.0/
  • Get the Node source (tarball) from https://nodejs.org/en/download/current/
  • Unpack (tar xzf will untar the Node tarball into a separate directory), cd to unpacked directory, then configure using:
  • ./configure --prefix=/home/devman/node/infrastructure/$(basename $(pwd))
  • Then make (this takes a long time)
  • Then make test
  • Then make install. You end up with the structure above in the home directory (hopefully).
  • Create symlinks as needed: cd ~/node; ln -s infrastructure/node-v10.10.0 node-v10
  • Modify PATH (this needs to be added to ~/.bashrc, too): export PATH=/home/devman/node/node-v10/bin:$PATH
  • Create a copy of the installed file tree for fallback: cd ~; cp -a node/ node.initial
  • Now we have the following, as shown by tree -L 4 ~/node:
node/
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       │   ├── node
│       │   ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│       │   └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
│       ├── include
│       │   └── node
│       ├── lib
│       │   └── node_modules
│       └── share
│           ├── doc
│           ├── man
│           └── systemtap
└── node-v10 -> infrastructure/node-v10.10.0/
  • Install elm: npm install -g elm
  • After that, check that the elm executable is the one expected: which elm should give ~/node/node-v10/bin/elm and elm --version should give 0.19.0.
  • Now we have the following, as shown by tree -L 4 ~/node:
node
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       │   ├── elm -> ../lib/node_modules/elm/bin/elm
│       │   ├── node
│       │   ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│       │   └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
│       ├── include
│       │   └── node
│       ├── lib
│       │   └── node_modules
│       └── share
│           ├── doc
│           ├── man
│           └── systemtap
└── node-v10 -> infrastructure/node-v10.10.0/
node
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       │   ├── elm -> ../lib/node_modules/elm/bin/elm
│       │   ├── elm-test -> ../lib/node_modules/elm-test/bin/elm-test
│       │   ├── node
│       │   ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│       │   └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
│       ├── include
│       │   └── node
│       │       └── (...various...)
│       ├── lib
│       │   └── node_modules
│       │       ├── elm
│       │       ├── elm-test
│       │       └── npm
│       └── share
│           ├── doc
│           │   └── node
│           ├── man
│           │   └── man1
│           └── systemtap
│               └── tapset
└── node-v10 -> infrastructure/node-v10.10.0/

Let's try this out.

dtonhofer commented Sep 18, 2018

Installing elm 0.19.0 using npm seems to work now (2018-09-18). (Can you even add properly add elm modules without npm?)

Repeat of my installation instructions on Fedora 28:

  • I install in the home directory of user devman, which is the user whose mission is to explore new worlds and new civilizations.
  • Goal: to have an installation like the following: All the stuff under ~/node/infrastructure, with symlinks pointing to the currently used version:
node
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       ├── include
│       ├── lib
│       └── share
└── node-v10 -> infrastructure/node-v10.10.0/
  • Get the Node source (tarball) from https://nodejs.org/en/download/current/
  • Unpack (tar xzf will untar the Node tarball into a separate directory), cd to unpacked directory, then configure using:
  • ./configure --prefix=/home/devman/node/infrastructure/$(basename $(pwd))
  • Then make (this takes a long time)
  • Then make test
  • Then make install. You end up with the structure above in the home directory (hopefully).
  • Create symlinks as needed: cd ~/node; ln -s infrastructure/node-v10.10.0 node-v10
  • Modify PATH (this needs to be added to ~/.bashrc, too): export PATH=/home/devman/node/node-v10/bin:$PATH
  • Create a copy of the installed file tree for fallback: cd ~; cp -a node/ node.initial
  • Now we have the following, as shown by tree -L 4 ~/node:
node/
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       │   ├── node
│       │   ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│       │   └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
│       ├── include
│       │   └── node
│       ├── lib
│       │   └── node_modules
│       └── share
│           ├── doc
│           ├── man
│           └── systemtap
└── node-v10 -> infrastructure/node-v10.10.0/
  • Install elm: npm install -g elm
  • After that, check that the elm executable is the one expected: which elm should give ~/node/node-v10/bin/elm and elm --version should give 0.19.0.
  • Now we have the following, as shown by tree -L 4 ~/node:
node
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       │   ├── elm -> ../lib/node_modules/elm/bin/elm
│       │   ├── node
│       │   ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│       │   └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
│       ├── include
│       │   └── node
│       ├── lib
│       │   └── node_modules
│       └── share
│           ├── doc
│           ├── man
│           └── systemtap
└── node-v10 -> infrastructure/node-v10.10.0/
node
├── infrastructure
│   └── node-v10.10.0
│       ├── bin
│       │   ├── elm -> ../lib/node_modules/elm/bin/elm
│       │   ├── elm-test -> ../lib/node_modules/elm-test/bin/elm-test
│       │   ├── node
│       │   ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│       │   └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
│       ├── include
│       │   └── node
│       │       └── (...various...)
│       ├── lib
│       │   └── node_modules
│       │       ├── elm
│       │       ├── elm-test
│       │       └── npm
│       └── share
│           ├── doc
│           │   └── node
│           ├── man
│           │   └── man1
│           └── systemtap
│               └── tapset
└── node-v10 -> infrastructure/node-v10.10.0/

Let's try this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment