ubuntudeno

How to Install Deno on Ubuntu


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?


Solution

  • Open your terminal and run this

    curl -fsSL https://deno.land/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