英文:
Updated Macbook to Ventura - now getting 'command not found: Flutter'
问题
output of echo $PATH
:
/Users/me/bin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/flutter/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
What the top of my .zshrc
file looks like:
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
Any help and info is greatly appreciated
P.S dart and python also cannot be found. But they're not in my path so guess that makes sense
英文:
Oddly enough I'm able to run my flutter applications, but I'd like to upgrade. However since I've updated to MacOS Ventura Flutter can't be found anymore...
output of echo $PATH
:
/Users/me/bin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/flutter/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
What the top of my .zshrc
file looks like:
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
Any help and info is greatly appreciated
>P.S dart and python also cannot be found. But they're not in my path so guess that makes sense
答案1
得分: 0
如果你通常通过输入以下命令来启动Flutter:
Flutter
你可以在 /usr
和 /opt
中搜索一个可执行的文件(即一个程序),文件名为 Flutter
,可以这样做:
find /usr /opt -name "Flutter" -type f -perm +111
然后,如果找到了,将包含 Flutter
的目录名称添加到你的 PATH
中。所以如果找到了:
/opt/homebrew/bin/Flutter
你可以执行以下命令:
export PATH=$PATH:/opt/homebrew/bin
如果在 /usr
或 /opt
中找不到它,你需要在整个文件系统中进行更耗时的搜索,并且抑制错误消息:
find / -name "Flutter" -type f -perm +111 2> /dev/null
英文:
If you normally start flutter by typing:
Flutter
you can search in /usr
and /opt
for a file (rather than a directory) that is executable (i.e. a program) and called Flutter
like this:
find /usr /opt -name "Flutter" -type f -perm +111
Then, if/when you find it, add the name of the directory that contains Flutter
to your PATH
. So if it finds:
/opt/homebrew/bin/Flutter
you would do:
export PATH=$PATH:/opt/homebrew/bin
If you don't find it in /usr
or /opt
, you will need to perform a more time-consuming search across the whole filesystem and also suppress error messages:
find / -name "Flutter" -type f -perm +111 2> /dev/null
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论