azmul hossain
azmul hossain

Reputation: 1351

Unable to install Deno in Ubuntu 18.04

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.

Upvotes: 3

Views: 3472

Answers (6)

Ali Aftab Bhuiyan
Ali Aftab Bhuiyan

Reputation: 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.

Upvotes: -1

R B
R B

Reputation: 658

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

Upvotes: 5

Kishore Newton
Kishore Newton

Reputation: 175

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

Upvotes: 6

Penny Liu
Penny Liu

Reputation: 17448

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

Upvotes: 1

Vishal Khare
Vishal Khare

Reputation: 41

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

Upvotes: 0

Stuart Rackham
Stuart Rackham

Reputation: 900

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
``

Upvotes: 2

Related Questions