Giter Site home page Giter Site logo

Comments (20)

creationix avatar creationix commented on May 7, 2024

you need to put the v in front. For example nvm install v0.4.12.

from nvm.

willbowling avatar willbowling commented on May 7, 2024

$ 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.

RichFromGalvanize avatar RichFromGalvanize commented on May 7, 2024

Having the same issue on Windows 7 using git bash.

from nvm.

vinaydotblog avatar vinaydotblog commented on May 7, 2024

I am getting same error message.

from nvm.

koenpunt avatar koenpunt commented on May 7, 2024

grep is never called with the o option, only egrep, so can it be that egrep is a symlink to grep?

from nvm.

funseiki avatar funseiki commented on May 7, 2024

I'm also having this issue on Windows 7 git bash - any fixes as of yet?

from nvm.

mikeumus avatar mikeumus commented on May 7, 2024

I'm having this issue as well with git bash on Windows 8.

from nvm.

ljharb avatar ljharb commented on May 7, 2024

@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.

mikeumus avatar mikeumus commented on May 7, 2024

Sure @ljharb: https://gist.github.com/mikeumus/6616504

from nvm.

ljharb avatar ljharb commented on May 7, 2024

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.

UltCombo avatar UltCombo commented on May 7, 2024

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.

tomByrer avatar tomByrer commented on May 7, 2024

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.

tomByrer avatar tomByrer commented on May 7, 2024

Seems that there is no -o flag for [e]grep either.
Use sed instead?

from nvm.

qkdreyer avatar qkdreyer commented on May 7, 2024

You can also check this Node Version Manager for Windows : https://github.com/hakobera/nvmw

from nvm.

trisys3 avatar trisys3 commented on May 7, 2024

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.

UltCombo avatar UltCombo commented on May 7, 2024

@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.

trisys3 avatar trisys3 commented on May 7, 2024

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.

Daniel-Hug avatar Daniel-Hug commented on May 7, 2024

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.

ljharb avatar ljharb commented on May 7, 2024

I'm going to close this - this is clearly a git bash issue on Windows, and not an nvm issue.

from nvm.

flcintfre avatar flcintfre commented on May 7, 2024

It's a conflict with Windows overriding GNU for me... Renamed C:\Windows\grep to grep2 and problem solved.

from nvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.