Question

[Solved] Rails: Why “sudo” command is not recognized?

In my application directory (on Windows) I run:

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.

What could be the problem ?

Solution #1:

Sudo is a Unix specific command designed to allow a user to carry out administrative tasks with the appropriate permissions.

Windows does not have (need?) this.

Run the command with the sudo removed from the start.

Respondent: Douglas F Shearer

Solution #2:

sudo is a Unix/Linux command. It’s not available in Windows.

Respondent: dnch

Solution #3:

That you are running Windows. Read:

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.

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.

Respondent: Jim Brissom

Solution #4:

sudo is used for Linux. It looks like you are running this in Windows.

Respondent: skaz

Solution #5:

sudo is a command for Linux so it cant be used in windows so you will get that error

Respondent: Ram kumar

Solution #6:

Sudo is a Unix specific command designed to allow a user to carry out administrative tasks with the appropriate permissions.
Windows doesn’t not have (need?) this.

Yes, windows don’t have sudo on its terminal. Try using pip instead.

  1. Install pip using the steps here.
  2. type pip install [package name] on the terminal. In this case, it may be pdfkit or wkhtmltopdf.
Respondent: Ramzs

Solution #7:

Analogue to sudo in Windows is running command prompt “As Administrator” by right-clicking on it’s link. Then everything you run in it will be “sudo-ed“.

Respondent: ScienceDiscoverer

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy