如何在Ubuntu上安装Deno

我运行的命令是:

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

输出为:

######################################################################## 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.

谁能解释如何在Ubuntu中正确安装deno?

评论
  • 念念不忘
    念念不忘 回复

    安装程序已经告诉您安装完成后的操作:

    手动将目录添加到$ HOME / .bash_profile(或类似文件)   导出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)

  • rqui
    rqui 回复

    You have to add the following commands after the installation to your bash profile. Usually ~/.bash_profile

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

    如您在输出中看到的:

    手动将目录添加到$ HOME / .bash_profile(或类似文件)