乐闻世界logo
搜索文章和话题

How to Install Deno on Ubuntu

1个答案

1
  1. Open the terminal First, open the Ubuntu terminal using the shortcut Ctrl + Alt + T.
  2. Install Deno using the curl command Within the terminal, use the curl command to download and install Deno. Enter the following command:
bash
curl -fsSL https://deno.land/x/install/install.sh | sh

This command downloads the installation script from the Deno official website and executes it via shell. 3. Set environment variables After installation, add the Deno installation path to your environment variables so you can run Deno from any location. Typically, the Deno installation script will prompt you to add the following line to your .bashrc or .zshrc file:

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

Open the .bashrc file and add the line above using:

bash
nano ~/.bashrc

Then add the export command at the end of the file, save and close it by pressing Ctrl + O, Enter, and Ctrl + X. 4. Apply environment variable changes After modifying .bashrc, reload it to apply the changes:

bash
source ~/.bashrc
  1. Verify Deno installation After installation, verify the successful installation of Deno by running:
bash
deno --version

If installed correctly, this command will display the Deno version information.

By following these steps, you should be able to successfully install Deno on the Ubuntu system. If you encounter any issues during installation, consult the Deno official documentation or seek help from relevant developer communities.

2024年7月20日 18:56 回复

你的答案