linux - 未找到命令,但在拖放时找到

标签 linux ubuntu unix terminal kali-linux

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

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

但是如果我将 flutter 拖放到终端,整个路径将出现在单引号中并运行所有内容

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.

其他文件也会发生这种情况

最佳答案

您需要在命令前添加 ./ 来运行当前目录中的命令,因此:./flutter

关于linux - 未找到命令,但在拖放时找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58465980/

相关文章:

linux - .htaccess 代码禁止某些 ip 并重定向到其他子域

linux - 多核处理器核心通信速度

c - 实时输入/输出(类似聊天)

ubuntu - 如何轻松创建 ChromeOS 和 Ubuntu 之间双启动的快捷方式?

linux - Unix 如果为空则跳过第一行

c - execvp 对内容进行排序

linux - 如何在 Linux 上测量随机/顺序读/写。固态硬盘注意事项

node.js - Firebase 服务失败但部署工作正常

ubuntu - 如何使用xenomai API?

linux - 从文件中提取一个单词并将文件另存为该单词