Comments (20)
you need to put the v
in front. For example nvm install v0.4.12
.
from nvm.
$ nvm install v0.6.14
results in the following...
grep: invalid option -- o
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Additional options while compiling:
nvm: install N/A failed!
please assist.
from nvm.
Having the same issue on Windows 7 using git bash.
from nvm.
I am getting same error message.
from nvm.
grep
is never called with the o
option, only egrep
, so can it be that egrep
is a symlink to grep?
from nvm.
I'm also having this issue on Windows 7 git bash - any fixes as of yet?
from nvm.
I'm having this issue as well with git bash on Windows 8.
from nvm.
@koenpunt -o
is a perfectly valid option for grep
- and egrep
as far as I know is just an alias for grep -e
.
@mikeumus / @funseiki : can you provide a gist showing the command line input and output?
from nvm.
Sure @ljharb: https://gist.github.com/mikeumus/6616504
from nvm.
Thanks @mikeumus! OK, then this sounds like it might be an issue with git bash
in Windows not supporting the -o
option on grep
.
I'm reopening this issue and will adjust the title to reflect that.
from nvm.
Since this is one of the first google results for git bash's seemingly terribly outdated grep problem, I'll post a temporary workaround here.
Open <Git install directory>/bin
and overwrite grep.exe
with a more up to date version. I found two alternatives that provide -o
support:
- GnuWin32's grep 2.5.4 (dl).
- ezwinports' grep 2.10 (dl). Note: You also have to extract
libprce-0.dll
in the same folder as grep.
Though ezwinports' grep port is much more up to date, I can't say whether any of these will cause stability/compatibility issues. I haven't found any issues yet, but use it at your own risk.
from nvm.
Works great @UltCombo !
I would note that only grep.exe
& libprce-0.dll
are needed to copy into git\bin
, since egrep & fgrep are already aliased in the Git Bash distro.
I also have a personal habit of renaming the old files as *name*_old.*ext*
, incase one has to rollback.
from nvm.
Seems that there is no -o
flag for [e]grep
either.
Use sed instead?
from nvm.
You can also check this Node Version Manager for Windows : https://github.com/hakobera/nvmw
from nvm.
If I used one of the zip files from this site, how could I get the grep.exe file from it? It seems to be the latest version, hosted right on the Git Bash site, but not included in Git Bash. I tried "configure" & that did a lot of stuff, but didn't make the exe. "make" doesn't come with git-scm.
from nvm.
@trisys3 You're linking to the official GNU grep, and as far as I know, GNU is Unix-compatible only. If you're running Windows, you will need a port of it - see my comment above.
from nvm.
OK, I guess I'll just use ezwinport's port. It's just so frustrating that Git Bash has on its site not only the latest version, but the latest dev version, and they can't think to port it over.
from nvm.
I also get a similar error when trying to update node using the n package:
D:\Users\Daniel>npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
D:\Users\Daniel>npm install -g n
npm http GET https://registry.npmjs.org/n
npm http 200 https://registry.npmjs.org/n
npm http GET https://registry.npmjs.org/n/-/n-1.2.1.tgz
npm http 200 https://registry.npmjs.org/n/-/n-1.2.1.tgz
D:\Users\daniel\AppData\Roaming\npm\n -> D:\Users\daniel\AppData\Roaming\npm\nod
e_modules\n\bin\n
[email protected] D:\Users\daniel\AppData\Roaming\npm\node_modules\n
D:\Users\Daniel>n stable
Input file specified two times.
grep: invalid option -- o
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
cp: cannot stat `/usr/local/n/versions//*': No such file or directory
D:\Users\Daniel>
from nvm.
I'm going to close this - this is clearly a git bash
issue on Windows, and not an nvm
issue.
from nvm.
It's a conflict with Windows overriding GNU for me... Renamed C:\Windows\grep to grep2 and problem solved.
from nvm.
Related Issues (20)
- nvm ls-remote command results in "N/A" (can't install Node 20) HOT 5
- `nvm use` in vscode, run `npm script` and switch node versions automatically HOT 5
- [Feature Request]: is there an option can be used to exclude iojs? HOT 7
- Failed to install node using the install command HOT 5
- [spam]
- [spam]
- Error when using the Windows version of curl HOT 1
- [spam]
- curl-install-sh: `fatal: bad object` from git clone steps HOT 6
- uninstall failed HOT 2
- Consider adding an option for retrying binary downloads before switching to source code compilation or disable fallback to source code compilation if binary cannot be downloaded HOT 4
- [spam]
- "ls-remote",I'm a little confused as to how running that command didn't return the node version. HOT 11
- Unbound variable error with set -u.
- Fail to install with `install.sh` script HOT 5
- install-latest-npm does not work for node>=v14.17 HOT 1
- Potential 0.40.0 regression on Github Actions runners HOT 21
- unable to install nvm HOT 16
- [spam]
- Action Required: Fix Renovate Configuration HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvm.