[英]Terminal is access denied of flutter sdk path variable .zshrc file
Wrote path for flutter SDK
with $HOME/.zshrc
and with export PATH="$PATH:/Users/prettygirl/FlutterSDK/flutter/bin"
使用
$HOME/.zshrc
和export PATH="$PATH:/Users/prettygirl/FlutterSDK/flutter/bin"
为flutter SDK
编写路径
It went ok and even the flutter doctor
worked.一切顺利,甚至
flutter doctor
工作了。
Then when I close the terminal
and reopen it, then it shows .zshrc permission denied
, but I have given full disk access
to the terminal
.然后当我关闭
terminal
并重新打开它时,它会显示.zshrc permission denied
,但我已经给了terminal
full disk access
。
/Users/prettygirl/.zprofile:export:1: not valid in this context: PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/prettygirl/FlutterSDK/flutter/bin /Users/prettygirl/.zshrc:1: permission denied: /Users/prettygirl/FlutterSDK/flutter/bin
now when I run flutter doctor
it says zsh: command not found: flutter
like I never updated the SDK path.现在,当我运行
flutter doctor
它说zsh: command not found: flutter
就像我从未更新过 SDK 路径一样。
Opened .zshrc
file with a text editor
and it contains the path and opens fine.用
a text editor
打开.zshrc
文件,它包含路径并且打开正常。
Why is that?这是为什么?
you need to set the SDK path in the .zshrc file您需要在 .zshrc 文件中设置 SDK 路径
open .zshrc file打开 .zshrc 文件
vim .zshrc
add a line on this file在此文件上添加一行
export PATH="$PATH:[PATH_OF_FLUTTER_GIT_DIRECTORY]/bin"
close terminal and reopen the terminal check关闭终端并重新打开终端检查
echo $path
if a path is showing then try other commands related to flutter.如果显示路径,则尝试其他与颤振相关的命令。
flutter doctor
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.