-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Ubuntu 13.04, json fails to do anything once installed #56
Comments
@craigwblake I don't have enough to go on here. How did you install this? |
Sure, I'll share what I can. I run "apt-get install node" to install node then ran "npm install -g jsontool" per the instructions on the main page. That all completed without error, and it installed the json command in "/usr/local/bin/json" Here is the content of the file in that location:
|
@craigwblake Thanks. Okay, what is the output of:
I've not seen that behaviour (calling |
Well I ran that and it didn't work I looked into and found out that on Ubuntu the Node.js binary is installed as 'nodejs'. That certainly explains why it wasn't working, but it's definitely not obvious from the lack of output. Maybe it's worth checking for 'nodejs' as the executable if 'node' fails in your script? |
Also, for reference there is a different 'node' binary on Ubuntu (which is why nodejs could not use the name) which when run outputs nothing. Quite an annoying coincidence that made the problem non-obvious. |
What?! That's crazy. I don't know a reasonable way to deal with that on A little bit of searching turned this up: http://askubuntu.com/questions/235655/node-js-conflicts-sbin-node-vs-usr-bin-node Specifically:
Is that a reasonable workaround for you? I'm not familiar with current and past Ubuntu node.js packaging naming. |
I tried but it still didn't link the 'nodejs' binary to 'node'. Oh well, I manually linked it so it works now. Perhaps it would be sufficient for a warning for Ubuntu users on your installation instructions? |
@craigwblake I got a response from @isaacs: The answer is that this is a known bug in debian-stable. He should either: a) install from source, b) install from the binary tarballs on http://nodejs.org/ or c) use chrislea's PPA https://launchpad.net/~chris-lea/+archive/node.js/ it is my understanding that Debian is changing this moving forward. |
README.md warning added in the install section. Thanks! |
Instead of #!/usr/bin/env sh
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@" Say whaaaat? It's a polyglot script. Credit goes to guys on stackexchange. |
See #74. The warnings in docs and install scripts are probably no longer required with this hack and could be removed. |
Installation completes normally, 'json' program is present but no matter what I run there is no output
$ json --version
$
$ echo '{"foo":"bar"}' | json
$
The text was updated successfully, but these errors were encountered: