Reputation: 6503
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?
Upvotes: 15
Views: 10474
Reputation: 1832
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
Upvotes: 21
Reputation: 7420
You just follow the command line
######################################################################## 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
It tell you that you need to go to $HOME/.bash_profile
or similar one to add this configuration.
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
Here is how to add it step by step
sudo nano ~/.bash_profile
or sudo nano ~/.bashrc
(I use this because my OS is Ubuntu)export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
Note: for those who are using Ubuntu, it is a little bit different.
export DENO_INSTALL="/$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
deno --version
to check.Upvotes: 0
Reputation: 1276
You have to add the scripts in your bashrc
profile.
Open the bashrc
file with any command below and add the scripts at the end of the file. After saving the file, restart your terminal.
# for gedit text editor
gedit ~/.bashrc
# or for GNU nano editor
nano ~/.bashrc
# deno
export DENO_INSTALL="/home/YOUR_USERNAME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
Full explanation with details: How to install Deno on Windows, Mac, and Linux Operating Systems
Upvotes: 0
Reputation: 6503
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
Upvotes: 6
Reputation: 75
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
Upvotes: 3
Reputation:
You have to configure globally in ubuntu system. So first of all ,
nano ~/.bashrc
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
Then just source bashrc file.
source ~/.bashrc
Upvotes: 2
Reputation: 40434
You have to add the following commands after the installation to your bash profile. Usually ~/.bashrc
or ~./bash_profile
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
(please have in mind that the above commands may change, so always use the values you got from the installation output)
As you can see in the output of the installation:
Deno was installed successfully to /root/.deno/bin/deno.
Manually add the directory to your $HOME/.bash_profile (or similar)
Once you have added those two lines you can start a new terminal, or just load your bash profile using source
command
source ~/.bashrc
# or source ~/.bash_profile
If you want to install a specific version you can do so adding: -s {version}
to that command:
curl -fsSL https://deno.land/x/install/install.sh | sh -s v0.42.0
Upvotes: 3
Reputation: 11622
The installer already telling you what to do after installation is finished:
Manually add the directory to your $HOME/.bash_profile (or similar)
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
You can just run the two lines in the terminal directly to start using it in your current terminal or just edit and add them to $HOME/.bashrc
or $HOME/.bash_profile
(or similar)
Upvotes: 3