keybase / keybase-issues

A single repo for managing publicly recognized issues with the keybase client, installer, and website.
902 stars 37 forks source link

cygwin #1100

Open ralfhauser opened 9 years ago

ralfhauser commented 9 years ago

it would be great to have a documentation how to work on the command-line with cygwin

zQueal commented 9 years ago

Are there any advantages of working with Cygwin as opposed to simply working directly with Windows? (serious)

ralfhauser commented 9 years ago

I like the command-line interface. But maybe I misinterpret what you mean with "Windows"? I get a tar-ball from node.js and git-directory tree when on https://keybase.io/docs/command_line/installation following "The installer on github", but nothing that looks even distantly like what normal windows users consider to be an "installer". What am I missing?

zQueal commented 9 years ago

Correct me if I'm wrong, but I'm pretty sure Cygwin uses bash? If that's the case just add the Git cmd andbin` directories into your $PATH.

C:\Program Files (x86)\Git\cmd
C:\Program Files (x86)\Git\bin

Then you can just use Bash via the command prompt and not have to rely on Cygwin.

image

ralfhauser commented 9 years ago

Yes, it uses bash uname -a CYGWIN_NT-6.1-WOW64 ralf-PC 1.7.32(0.274/5/3) 2014-08-13 23:03 i686 Cygwin

unfortunately, "npm" doesn't appear to exist on cygwin as per https://keybase.io/docs/command_line/installation

But where would I find the "cmd" directory? Neither in

zQueal commented 9 years ago

Well, the git-scm for windows download includes many linux utilities that are used by Git. Or, if you already have Git installed you can simply install Bash for Windows. There are a ton of different ports for it.

ralfhauser commented 9 years ago

Thanks - finally I understand your first comment: the main advantage of cygwin over working directly with the Windows command prompt is: I have it already and also use it in other contexts. So, less software installed on my computer. Also, with cygwin, I was able to create my github proof (bash, curl, gpg, etc.)

ralfhauser commented 9 years ago

However, what I am still missing: How do I install keybase without npm - is there any step-by-step instruction (possibly with screenshots)?

ghost commented 9 years ago

Currently there is no other official way to install without npm. You can try to clone the repository and run bin/main.js by hand out of it. You still need to have node installed. Either it works with the modules located inside the repository or you need to have those modules installed in the proper namespace so that they can be used. (I have them installed globally, so I couldn't test this assumption)

ralfhauser commented 9 years ago

I guess I am close to a full solution (albeit 3 failed approaches): i) 1) http://nodejs.org/dist/latest/x64/node.exe or http://nodejs.org/dist/latest/node-v0.10.32-x86.msi 2) in /cygdrive/c/Program Files (x86)/nodejs run npm install -g keybase-installer
3) unfortunately, continuing as per https://keybase.io/docs/command_line/installation it fails then with nodejs $ keybase-installer info: Made temporary directory: Q:\cygwin\tmp\keybase_install_zbRpq5iYnT4jfLHUDc25lg info: Using keyset version v1 info: Fetching URL https://dist.keybase.io/sig/files/1/index.asc info: Fetching URL https://dist.keybase.io/pkg/stable

net.js:156 this._handle.open(options.fd); ^ Error: EINVAL, invalid argument at new Socket (net.js:156:18) at process.stdin (node.js:664:19) at new ProgressBar (C:\Users\ralf\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\progress\lib\node-progress.js:42:19) at ClientRequest. (C:\Users\ralf\AppData\Roaming\npm\node_modules\keybase-installer\lib\request.js:65:26) at ClientRequest.g (events.js:180:16) at ClientRequest.emit (events.js:95:17) at HTTPParser.parserOnIncomingClient as onIncoming at HTTPParser.parserOnHeadersComplete as onHeadersComplete at CleartextStream.socketOnData as ondata at CleartextStream.read as _read

ii) Also a more linux like approach fails after step 1) above: ~ $ curl https://www.npmjs.org/install.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6711 100 6711 0 0 4371 0 0:00:01 0:00:01 --:--:-- 16529 tar=/usr/bin/tar version: tar (GNU tar) 1.27.1 Packaged by Cygwin (1.27.1-1) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason. install npm@latest fetching: http://registry.npmjs.org/npm/-/npm-2.1.2.tgz

Q:\cygwin\tmp\npm.6352\package\bin\read-package-json.js:18 val = val[f] ^ TypeError: Cannot read property 'node' of undefined at Q:\cygwin\tmp\npm.6352\package\bin\read-package-json.js:18:16 at Array.forEach (native) at Q:\cygwin\tmp\npm.6352\package\bin\read-package-json.js:17:11 at Array.forEach (native) at Q:\cygwin\tmp\npm.6352\package\bin\read-package-json.js:14:22 at Q:\cygwin\tmp\npm.6352\package\node_modules\read-package-json\read-json.js:51:40 at final (Q:\cygwin\tmp\npm.6352\package\node_modules\read-package-json\read-json.js:349:17) at then (Q:\cygwin\tmp\npm.6352\package\node_modules\read-package-json\read-json.js:126:33) at Q:\cygwin\tmp\npm.6352\package\node_modules\read-package-json\read-json.js:266:40 at evalmachine.:271:14 You need node to run this program. node --version reports: v0.10.32 Please upgrade node before continuing. It failed

iii) the even cleaner cygwin approach failed too :( install nodejs as per http://howtonode.org/how-to-install-nodejs --> see section Windows / cygwin (looks a little bit like an overkill that >120MB node is in that git-repository) currently fails when doing "make" in <<git clone git://github.com/ry/node.git cd node ./configure make sudo make install>> 19 ralf@ralf-PC:~ $ cd node ./configure make sudo make install20 ralf@ralf-PC:~/node $ ./configure ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles. { 'target_defaults': { 'cflags': [], 'default_configuration': 'Release', 'defines': ['OPENSSL_NO_SSL2=1'], 'include_dirs': [], 'libraries': []}, 'variables': { 'clang': 0, 'gcc_version': 48, 'host_arch': 'ia32', 'node_install_npm': 'true', 'node_prefix': '', 'node_shared_cares': 'false', 'node_shared_http_parser': 'false', 'node_shared_libuv': 'false', 'node_shared_openssl': 'false', 'node_shared_v8': 'false', 'node_shared_zlib': 'false', 'node_tag': '', 'node_use_dtrace': 'false', 'node_use_etw': 'true', 'node_use_mdb': 'false', 'node_use_openssl': 'true', 'node_use_perfctr': 'true', 'openssl_no_asm': 0, 'python': '/usr/bin/python', 'target_arch': 'ia32', 'uv_library': 'static_library', 'v8_enable_gdbjit': 0, 'v8_enable_i18n_support': 0, 'v8_no_strict_aliasing': 1, 'v8_optimized_debug': 0, 'v8_random_seed': 0, 'v8_use_snapshot': 'true', 'want_separate_host_toolset': 0}} creating ./config.gypi creating ./config.mk 21 ralf@ralf-PC:~/node $ make /usr/bin/python tools/gyp_node.py -f make make -C out BUILDTYPE=Release V=1 make[1]: Entering directory '/usr/local/node/out' cc '-DOPENSSL_NO_SSL2=1' '-DWIN32' '-D_CRT_SECURE_NO_DEPRECATE' '-D_CRT_NONSTDC_NO_DEPRECATE' '-DBUILDING_V8_SHARED=1' '-DBUILDING_UV_SHARED=1' '-DHAVE_CONFIG_H' '-DCARES_STATICLIB' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/win32 -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -MMD -MF /usr/local/node/out/Release/.deps//usr/local/node/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o.d.raw -c -o /usr/local/node/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o ../deps/cares/src/ares_cancel.c In file included from ../deps/cares/src/ares_setup.h:32:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/config/win32/ares_config.h:225:21: error: two or more data types in declaration specifiers

define ssize_t int

                 ^

In file included from /usr/include/cygwin/sys_time.h:13:0, from /usr/include/sys/time.h:61, from /usr/include/sys/_default_fcntl.h:200, from /usr/include/sys/fcntl.h:3, from /usr/include/fcntl.h:14, from ../deps/cares/src/setup_once.h:72, from ../deps/cares/src/ares_setup.h:218, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/select.h:31:5: error: conflicting types for ‘select’ int select P ((int n, fd_set _readfds, fd_set *writefds, ^ In file included from ../deps/cares/src/ares_setup.h:117:0, from ../deps/cares/src/ares_cancel.c:15: /usr/include/w32api/winsock2.h:995:34: note: previous declaration of ‘select’ was here WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set readfds,fd_set writefds,fd_set *exceptfds,const PTIMEVAL timeout); ^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:474:0: warning: "ESOCKTNOSUPPORT" redefined [enabled by default]

define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:156:0: note: this is the location of the previous definition

define ESOCKTNOSUPPORT 124 / Socket type not supported /

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:477:0: warning: "EPFNOSUPPORT" redefined [enabled by default]

define EPFNOSUPPORT WSAEPFNOSUPPORT

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:132:0: note: this is the location of the previous definition

define EPFNOSUPPORT 96 / Protocol family not supported /

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:500:0: warning: "ESHUTDOWN" redefined [enabled by default]

define ESHUTDOWN WSAESHUTDOWN

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:140:0: note: this is the location of the previous definition

define ESHUTDOWN 110 / Can't send after socket shutdown /

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:501:0: warning: "ETOOMANYREFS" redefined [enabled by default]

define ETOOMANYREFS WSAETOOMANYREFS

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:162:0: note: this is the location of the previous definition

define ETOOMANYREFS 129

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:511:0: warning: "EHOSTDOWN" redefined [enabled by default]

define EHOSTDOWN WSAEHOSTDOWN

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:148:0: note: this is the location of the previous definition

define EHOSTDOWN 117 / Host is down /

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:517:0: warning: "EPROCLIM" redefined [enabled by default]

define EPROCLIM WSAEPROCLIM

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:164:0: note: this is the location of the previous definition

define EPROCLIM 130

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:518:0: warning: "EUSERS" redefined [enabled by default]

define EUSERS WSAEUSERS

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:165:0: note: this is the location of the previous definition

define EUSERS 131

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:519:0: warning: "EDQUOT" redefined [enabled by default]

define EDQUOT WSAEDQUOT

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:167:0: note: this is the location of the previous definition

define EDQUOT 132

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:520:0: warning: "ESTALE" redefined [enabled by default]

define ESTALE WSAESTALE

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:168:0: note: this is the location of the previous definition

define ESTALE 133

^ In file included from ../deps/cares/src/ares_setup.h:218:0, from ../deps/cares/src/ares_cancel.c:15: ../deps/cares/src/setup_once.h:521:0: warning: "EREMOTE" redefined [enabled by default]

define EREMOTE WSAEREMOTE

^ In file included from /usr/include/errno.h:9:0, from ../deps/cares/src/ares_setup.h:79, from ../deps/cares/src/ares_cancel.c:15: /usr/include/sys/errno.h:98:0: note: this is the location of the previous definition

define EREMOTE 66 / The object is remote /

^ deps/cares/cares.target.mk:124: recipe for target '/usr/local/node/out/Release/obj.target/cares/deps/cares/src/arescancel.o' failed make[1]: ** [/usr/local/node/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o] Error 1 make[1]: Leaving directory '/usr/local/node/out' Makefile:45: recipe for target 'node' failed make: *\ [node] Error 2

TravelingTechGuy commented 8 years ago

Coming to this quite late, but here's my take: I'm using the Git Bash console, under ConEmu. I also preferred using that console to whatever Keybase installed. All I had to do was add the path of the keybase.exe to my system path.

Either open the shell the installer added, and copy the path; or open any console and type where keybase. In my case it was under C:\Users\MyUserName\AppData\Roaming\Keybase. Once added to the system Path variable, I can now run keybase in Git Bash.