-2

我在颤振目录中运行颤振命令,但它说找不到命令

root/korra:/Desktop/flutter/bin# flutter  
bash: flutter: command not found

但是如果我将颤振拖放到终端整个路径将在单引号下并运行所有内容

root@Korra:~# '/root/Desktop/flutter/bin/flutter' 
   Woah! You appear to be trying to run flutter as root.
   We strongly recommend running the flutter tool without superuser privileges.
  /

Manage your Flutter app development.

Common commands:

  flutter create <output directory>
    Create a new Flutter project in the specified directory.

  flutter run [options]
    Run your Flutter application on an attached device or in an emulator.


Run "flutter help <command>" for more information about a command.
Run "flutter help -v" for verbose help output, including less commonly used
options.

这也发生在其他文件上

4

1 回答 1

0

您需要在命令前加上前缀./才能在当前目录中运行命令,因此:./flutter.

于 2019-10-19T17:15:19.523 回答