Unable to install Deno in Ubuntu 18.04
Asked Answered
L

6

3

I am trying to install Deno in my Ubuntu machine but I can't. Ubuntu Version is 18.04.

I am using this command:

curl -fsSL https://deno.land/x/install/install.sh | sh 

It has provided by Deno's official page. After installing Deno, I set below configuration in .bash_profile.

export DENO_INSTALL="/home/azmul/.local"
export PATH="$DENO_INSTALL/bin:$PATH"

After doing this when I try to run deno command on my terminal. I always found 'deno' not found on my terminal. I don't know what should i do. If anyone has a good sound about this please give me an answer.

Localism answered 13/2, 2020 at 15:39 Comment(2)
Have you sourced your .bash_profile afterwards?Disappear
You need to set DENO_INSTALL before installation if you want to use a non-default location during install. See: github.com/denoland/deno_install#environment-variablesAbbreviate
T
6

Try running this:

curl -fsSL https://deno.land/x/install/install.sh | sudo DENO_INSTALL=/usr/local sh

DENO_INSTALL - The directory in which to install Deno. This defaults to $HOME/.deno. The executable is placed in $DENO_INSTALL/bin.

In this case, you should get :

Deno was installed successfully to /usr/local/bin/deno

Titular answered 20/5, 2020 at 10:52 Comment(1)
It's really helpful.Spotweld
D
5

Edit ~/.bashrc file

Do the following changes

gedit ~/.bashrc

Add the following code to end of the line

export PATH="$PATH:$HOME/.deno/bin:$PATH"

source .bashrc file

source ~/.bashrc

Now check

deno -V

It will show the version of deno like

deno 1.0.3

Dermot answered 30/5, 2020 at 7:27 Comment(1)
this worked, but i had to check with deno -versionCarrousel
L
2

I've not had any issues installing on 18.04. The deno executable should have installed to ~/.local/bin:

$ ls -l ~/.local/bin
total 60944
-rwxr-xr-x 1 srackham srackham 62400040 Feb 12 19:10 deno

$ which deno
/home/srackham/.local/bin/deno
``
Laxity answered 13/2, 2020 at 23:7 Comment(0)
B
1

Set up your .bashrc file.

gedit ~/.bashrc

Then, edit the .bashrc file and add the following commands.

export DENO_INSTALL="/home/azmul/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

Finally, source .bashrc file in shorter form.

. ~/.bashrc
Bellina answered 20/5, 2020 at 9:10 Comment(0)
O
0

I got it working by editing ~/.bashrc file.

Do following-

  1. vi ~/.bashrc
  2. Add this command at the bottom (replace {username} with your username)- export PATH="/home/{username}/.deno/bin:$PATH"
  3. source ~/.bashrc

NOTE : For me, deno installed at /home/{username}/.deno/bin and NOT at ~/.local/bin

Oliviero answered 16/5, 2020 at 3:42 Comment(0)
M
-1

Moving the 'deno' file is worked for me.

First, I navigate to ~/.deno/bin/ and then,

sudo mv deno /usr/local/bin/

That's it.

Mikael answered 18/8, 2021 at 15:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.