Ruby-on-rails Rails:为什么无法识别“sudo”命令?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5175109/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Rails: Why "sudo" command is not recognized?
提问by Misha Moroshko
In my application directory (on Windows) I run:
在我的应用程序目录(在 Windows 上)中,我运行:
sudo pdfkit --install-wkhtmltopdf
as explained here, but I got this error:
为解释在这里,但我得到这个错误:
'sudo' is not recognized as an internal or external command, operable program or batch file.
'sudo' 不是内部或外部命令,也不是可运行的程序或批处理文件。
What could be the problem ?
可能是什么问题呢 ?
回答by Douglas F Shearer
Sudo is a Unix specific command designed to allow a user to carry out administrative tasks with the appropriate permissions.
Sudo 是 Unix 特定的命令,旨在允许用户以适当的权限执行管理任务。
Windows does not have (need?) this.
Windows 没有(需要?)这个。
Run the command with the sudo removed from the start.
从一开始就删除 sudo 运行命令。
回答by Dan Cheail
sudois a Unix/Linux command. It's not available in Windows.
sudo是一个 Unix/Linux 命令。它在 Windows 中不可用。
回答by Jim Brissom
That you are running Windows. Read:
您正在运行 Windows。读:
http://en.wikipedia.org/wiki/Sudo
http://en.wikipedia.org/wiki/Sudo
It basically allows you to execute an application with elevated privileges. If you want to achieve a similar effect under Windows, open an administrative prompt and execute your command from there. Under Vista, this is easily done by opening the shortcut while holding Ctrl+Shift at the same time.
它基本上允许您以提升的权限执行应用程序。如果您想在 Windows 下实现类似的效果,请打开管理提示并从那里执行您的命令。在 Vista 下,这很容易通过打开快捷方式同时按住 Ctrl+Shift 来完成。
That being said, it might very well be possible that your account already has sufficient privileges, depending on how your OS is setup, and the Windows version used.
话虽如此,您的帐户很可能已经拥有足够的权限,具体取决于您的操作系统的设置方式以及所使用的 Windows 版本。
回答by skaz
sudo is used for Linux. It looks like you are running this in Windows.
sudo 用于 Linux。看起来您正在 Windows 中运行它。
回答by Ram kumar
sudo is a command for Linux so it cant be used in windows so you will get that error
sudo 是 Linux 的命令,所以它不能在 Windows 中使用,所以你会得到那个错误

