如果你通过curl已经成功安装了deno,却出现command not found: deno
,是因为环境变量没配置好。
- 如果你用的终端是bash(macOS Catalina之前版本默认终端),那么在
~/.bash_profile
中添加下面的环境变量(admin
要换成你的用户名):export DENO_INSTALL="/Users/admin/.deno" export PATH="$DENO_INSTALL/bin:$PATH"
保存后,在终端执行
source ~/.bash_profile
,然后应该就可以使用deno了。 - 如果你用的终端是zsh(macOS Catalina +默认的终端),你需要在
~/.zshrc
中添加上面的环境变量。如果你不想在
~/.zshrc
中添加,就是想在~/.bash_profile
中添加,那么就把source ~/.bash_profile
添加到~/.zshrc
中。
别忘记重启终端。
Related Posts
- macOS中staff和wheel是什么?
- 切换默认shell与fish
- Xcode Swift “Cannot find ‘MyClass’ in scope”
- Amazon S3 存储桶无法删除
- 关闭Sublime Text更新检查
- Device supports arm64-v8a, but APK only supports armeabi on device *
- npm ERR! gyp verb `which` failed Error: not found: python
- c++ ‘-DNODE_GYP_MODULE_NAME=libsass’ ‘-DUSING_UV_SHARED=1’ ‘-
- Sublime Text 自动换行