未找到须藤.尝试 npm 安装 [英] Sudo not found. Trying npm install
问题描述
我使用的是 Windows 8.1 笔记本电脑.我一直找不到sudo.使用以下命令尝试 npm install:
I am using a Windows 8.1 laptop. I keep getting sudo not found. Trying npm install with the following command:
F:\Webruin2>sudo npm install -g git
'sudo' is not recognized as an internal or external command,
operable program or batch file.
F:\Webruin2>npm install -g git
git@0.1.5 C:\Users\Dave\AppData\Roaming\npm\node_modules\git
└── mime@1.2.9
F:\Webruin2>git -v
'git' is not recognized as an internal or external command,
operable program or batch file.
F:\Webruin2>npm install -s sudo
sudo@1.0.3 node_modules\sudo
├── inpath@1.0.2
├── pidof@1.0.2
└── read@1.0.5 (mute-stream@0.0.4)
F:\Webruin2>sudo npm install -g git
'sudo' is not recognized as an internal or external command,
operable program or batch file.
请告诉我继续操作的最佳方式.如果这是题外话,请帮助我回到主题.;)
Please let me know the best way to proceed. If this is off topic, please help me get it back on topic. ;)
蒂姆
推荐答案
Windows 命令提示符 (cmd.exe) 无法识别sudo"命令,因为sudo"是基于 Unix/Linux 的应用程序仅与该特定操作系统兼容.Windows 当前不包含或不支持此命令.
The 'sudo' command will not be recognized by the Windows command prompt (cmd.exe) because 'sudo' is a Unix/Linux-based application which is only compatible with that particular operating system. Windows does not currently include or support this command.
在 Unix/Linux 操作系统上,'sudo' 是一个应用程序,用于临时获得另一个用户(通常是 root/管理员)的安全权限,通常用于安装软件或驱动程序,类似于运行以管理员身份使用 Windows 命令提示符.
On a Unix/Linux operating system, 'sudo' is an application used to temporarily gain the security privileges of another user (usually root/administrator), often for the purpose of software or driver installation, and is similar to running the Windows command prompt as administrator.
根据您发布的输出,npm 似乎已经安装在您的系统上(如执行npm install -s sudo"所示),因此您应该能够使用命令npm"安装 npm 模块安装 $modulename",其中 '$modulename' 被替换为您要安装的模块或库的名称.
Based on the outputs you have posted, npm already appears to be installed on your system (as seen by the execution of "npm install -s sudo"), so you should be able to install npm modules with the command "npm install $modulename", with '$modulename' being replaced by the name of the module or library you wish to install.
如果您尝试在 Windows 平台上安装 Git,我建议您使用以下相应的安装程序:http://git-scm.com/download
If you are trying to install Git on your Windows platform, I recommend using the appropriate installer from: http://git-scm.com/download
这篇关于未找到须藤.尝试 npm 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!