Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Install Deno on Ubuntu

Tags:

ubuntu

deno

The command I run is:

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

The output is:

######################################################################## 100.0%
Archive:  /root/.deno/bin/deno.zip
  inflating: deno
Deno was installed successfully to /root/.deno/bin/deno
Manually add the directory to your $HOME/.bash_profile (or similar)
  export DENO_INSTALL="/root/.deno"
  export PATH="$DENO_INSTALL/bin:$PATH"
Run '/root/.deno/bin/deno --help' to get started

After this, I run deno in the terminal and it gives me an error.

Can anyone explain how to install Deno in Ubuntu properly?

like image 440
Parth kharecha Avatar asked May 17 '20 12:05

Parth kharecha


People also ask

How to install Deno on Windows?

Deno is secured by default, the code is executed in a secure sandbox. To install Deno, you need to download the executable. The installation is very simple, you only need to download Deno from a URL or using a package manager. Below are the installation commands which depend on the used operating system and package manager.

How to install dendeno on macOS and Linux?

Deno binaries can also be installed manually, by downloading a zip file at github.com/denoland/deno/releases . These packages contain just a single executable file. You will have to set the executable bit on macOS and Linux.

How do I update Deno on the CLI?

Get a detailed guide on the CLI here. To update a previously installed version of Deno, you can run: This will fetch the latest release from github.com/denoland/deno/releases , unzip it, and replace your current executable with it. You can also use this utility to install a specific version of Deno:

What is Deno?

Deno, the successor of Node.js, is now stable with it’s v1.0 release. Deno is a simple, modern, and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Here are some of its highlighting features.


3 Answers

Installing Deno by running the following command from it's official website

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

After installing it update .bashrc file in your profile directory:

sudo nano ~/.bashrc

then add these two lines in the file

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

you can get this two lines from the message you get after installing deno after

finally run the following command source ~/.bashrc

after that run deno by typing this command in terminal deno

This video explain the installation process in details Installing deno on ubuntu

like image 124
Ahmed Mahmoud Avatar answered Sep 30 '22 15:09

Ahmed Mahmoud


Open your terminal and run this

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

username: open termianla and run whoami

Now set path in .bashrc file

run nano .bashrc for open file and put below code with replacing with username

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

finally run the following command source ~/.bashrc

now run deno in your terminal

like image 20
Parth kharecha Avatar answered Sep 30 '22 15:09

Parth kharecha


I was also facing the same issue but below command worked for me:

curl -fsSL https://deno.land/x/install/install.sh | sudo DENO_INSTALL=/usr/local sh
like image 27
Abhishek Khatter Avatar answered Sep 30 '22 15:09

Abhishek Khatter