Cmd error: "sh" is not recognized as an internal or external command, operable program or batch file.
C:\Users\user>npm install -g node-curl
npm http GET https://registry.npmjs.org/node-curl
npm http 304 https://registry.npmjs.org/node-curl
> node-curl#0.1.4 install C:\Users\user\AppData\Roaming\npm\node_modules\node-cu
rl
> sh src/generate_curl_options_list.sh && node-waf configure build || true
"sh" is not recognized as an internal or external command, operable program or batch file.
"true" is not recognized as an internal or external command, operable program or batch file.
To expand on Florian's answer: You're on Windows, which doesn't have cURL or sh. You're trying to install a module that relies on your operating system offering the libcurl-library and sh, which is not shipped with Windows.
You have some options:
Write your own node-only implementation that behaves like curl.
See this question on SO: Curl equivalent in nodejs?
It goes into details of how to use the built-in http module, like curl.
Or install libcurl and sh on windows, with a tool like cygwin. I haven't tried this, and the npm module you're trying to install might still have dependencies on other unix tools that aren't solved by cygwin.
Or look for something else in http://search.npmjs.org/ that behaves like curl. Try httpsync or curly
I recommend option 1, it'll teach you basic http principles. The native modules in node already offer everything you might need curl for. :)
Well, using node-curl on windows, that doesn't have curl, is quite stupid.
Don't try.
Related
Trying to install PAM module on Windows 10 machine. currently not having much luck. not sure why I'm getting this error.
cpan> install Authen::PAM
Running install for module 'Authen::PAM'
Checksum for C:\STRAWB~1\cpan\sources\authors\id\N\NI\NIKIP\Authen-PAM-0.16.tar.gz ok
Configuring N/NI/NIKIP/Authen-PAM-0.16.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
'.' is not recognized as an internal or external command,
operable program or batch file.
Error in configuring the Authen::PAM module.
Warning: No success on command[C:\Strawberry\perl\bin\perl.exe Makefile.PL]
NIKIP/Authen-PAM-0.16.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Authen::PAM'.
Failed during this command:
NIKIP/Authen-PAM-0.16.tar.gz : writemakefile NO 'C:\Strawberry\perl\bin\perl.exe Makefile.PL' returned status 512
The module doesn't support Windows.
Specifically, the error results from the module's installer being incompatible with Windows. It tries to executes a Bourne shell command to invoke a Bourne shell script, and there is no such shell on your machine. Even if you could install such a shell, it wouldn't help. The script is very much only intended for unixy systems.[1]
There are ways of creating unixy environments on Windows. Virtual environments such as those created by Windows Subsystem for Linux (WSL), Cygwin and MSYS may support the module, but the perl from within those environments would have to be used.
I'm trying to install sqitch on Windows 10 after installing it with CPAN using latest Strawberry Perl.
cat NEWS >ReleaseNotes
'cat' is not recognized as an internal or external command,
operable program or batch file.
dmake.exe: Error code 129, while making 'ReleaseNotes'
GUIDO/libintl-perl-1.26.tar.gz
C:\Projects\STRAWB~1\c\bin\dmake.exe -- NOT OK
Stopping: 'install' failed for 'Locale::Messages'.
Unfortunately dependency Locale::Messages fails to install. Is it trying to invoke linux "cat" command on Windows? Is there a workaround?
I have just installed App::Sqitch on my copy of Strawberry Perl
It has created this file
C:\Strawberry\perl\site\bin\sqitch.bat
If you don't have that file then it sounds like your installation didn't work properly
If you do have that file, but you cannot run it without providing the full path, then C:\Strawberry\perl\site\bin isn't in your PATH
The module provides the sqitch command, which is documented here, call it from the command line like so:
sqitch [<options>] <command> [<command-options>] [<args>]
Note that the documentation has links to associated tutorials and other references to learn how to use it.
sqitch installed here by default:
root#test:~# which sqitch
/usr/local/bin/sqitch
Try searching for the file from the command line of Windows.
Just grab it from here and place it in your path:
https://github.com/theory/sqitch/blob/master/bin/sqitch
I am in the process of installing jupyterhub. I successfully install jupyterhub using:
python3 -m pip install jupyterhub
npm install -g configurable-http-proxy
However, when I run jupyterhub -h in the Windows command prompt it gives:
"jupyterhub" is not recognized as an internal or external command, operable
program or batch file.
I added C:\Users\User\AppData\Local\Continuum\Anaconda3\Lib\site-packages\jupyterhub\ to my user environment variable, however still receive the message. What path should I be using?
Please note that according to this, Jupyterhub is not officially supported for Windows yet.
That aside, you could dockerize it to make your life easier. For this error, please check if you can see the executable in C:\Program Files\Continuum Analytics\Anaconda3\scripts. The lib directory you're specifying contains python source files and not the executables.
I had this same issue, and I saw this occurred because jupyterhub is a python script rather than an executable. So to run this on Windows I needed to execute it like python C:\Program Files\Continuum Analytics\Anaconda3\scripts\jupyterhub.
However, I still was unable to run jupyterhub on Windows because it depends on the pwd module, which is a Unix/Linux only module.
As others have said, Windows is not a supported platform. JupyterHub is best used on Linux-like platforms where you have Docker or something similar to conatainerize each user's session.
A good alternative is to install Oracle VirtualBox and run a local VM. I run a 64-bit Ubuntu and it's quite good performance. It makes things much easier to run JupyterHub on. Asides depending on pwd, there are also assumptions around user-creation and other activities that Windows isn't going to handle well.
In short, if you want to run on native Windows, you're going to become the first JupyterHub Windows contributor. I looked at doing it but it looked like too much effort.
The upside of running a VM is that behaviour in the VM is going to more closely resemble what you have running on the server anyway. If you don't plan running on a server, then just "jupyter notebook", as this is all JupyterHub ends up running...
I have git for windows installed, but I can't run curl commands in cmd. If I type in curl, I get the following error:
'curl' is not recognized as an internal or external command, operable program or batch file.
Curl is normally included in the Git package for Windows.
If you start "Git Bash", the command "curl" should be available in your bash window.
The curl executable is located in the "bin" directory, along with all the other applications installed with git.
I am trying to run a Curl command wrapped inside Ruby code as below:
f=IO.popen("C:\Windows\System32\curl.exe -H 'Authorization: Bearer #{token}' -s -v -D - http://api.pageuppeople.com/v1/NAS/Config/LanguageDictionary/Overrides --debug 2>NUL").readlines
However, the output I get is:
'curl' is not recognized as an internal or external command, operable program or batch file
I am running on Windows 7.
I also have "C:\Windows\System32" set in the environment path.
Please help.
curl is not a component of Windows. Unless you have specifically installed it, it won't exist on the system.
I am not a Ruby expert, but I suspect that you should really be using the Net::HTTP Ruby library here, or something similar to it. Even on a system where curl is installed, launching it is not a sensible way of running an HTTP request.
Curl does not come with Windows, but it has been ported to Windows.
You can download it here:
http://sourceforge.net/projects/gnuwin32/file
I know nothing about Ruby, but I do know you shuld be using a native libary for your HTTP needs.
CURL is not a Windows component. Download curl.exe and keep it in your path.
Alternatively download curl.exe and invoke the command from the same folder.
Windows 10 now provides C:\Windows\System32\curl.exe but I still see that error message when I try to call it from a service (Jenkins user in my case).
I'll post an update when I find out something more (e.g. which user rights are necessary).
I've installed curl now with chocolatey. See https://chocolatey.org/packages/curl.